(now time.Time, idle time.Duration)
| 657 | } |
| 658 | |
| 659 | func (u *userTSDB) isIdle(now time.Time, idle time.Duration) bool { |
| 660 | lu := u.lastUpdate.Load() |
| 661 | |
| 662 | return time.Unix(lu, 0).Add(idle).Before(now) |
| 663 | } |
| 664 | |
| 665 | func (u *userTSDB) setLastUpdate(t time.Time) { |
| 666 | u.lastUpdate.Store(t.Unix()) |
no test coverage detected