MCPcopy
hub / github.com/coocood/freecache / update

Method update

timer.go:70–79  ·  view source on GitHub ↗

Periodically check and update of time

()

Source from the content-addressed store, hash-verified

68
69// Periodically check and update of time
70func (timer *cachedTimer) update() {
71 for {
72 select {
73 case <-timer.done:
74 return
75 case <-timer.ticker.C:
76 atomic.StoreUint32(&timer.now, getUnixTime())
77 }
78 }
79}

Callers 1

NewCachedTimerFunction · 0.95

Calls 1

getUnixTimeFunction · 0.85

Tested by

no test coverage detected