MCPcopy Create free account
hub / github.com/Shopify/goose / Duration

Method Duration

statetracker/tracker.go:43–52  ·  view source on GitHub ↗
(previous interface{}, desired interface{})

Source from the content-addressed store, hash-verified

41}
42
43func (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
54func (t *stateTracker) Get() interface{} {
55 t.cond.L.(*sync.RWMutex).RLock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected