(previous interface{}, desired interface{})
| 41 | } |
| 42 | |
| 43 | func (t *stateTracker) Duration(previous interface{}, desired interface{}) time.Duration { |
| 44 | t.cond.L.(*sync.RWMutex).RLock() |
| 45 | defer t.cond.L.(*sync.RWMutex).RUnlock() |
| 46 | |
| 47 | if t.value == desired { |
| 48 | return 0 |
| 49 | } |
| 50 | |
| 51 | return time.Since(t.lastSet[previous]) |
| 52 | } |
| 53 | |
| 54 | func (t *stateTracker) Get() interface{} { |
| 55 | t.cond.L.(*sync.RWMutex).RLock() |
nothing calls this directly
no outgoing calls
no test coverage detected