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

Struct cachedTimer

timer.go:36–40  ·  view source on GitHub ↗

Cached timer stores Unix time every second and returns the cached value

Source from the content-addressed store, hash-verified

34
35// Cached timer stores Unix time every second and returns the cached value
36type cachedTimer struct {
37 now uint32
38 ticker *time.Ticker
39 done chan bool
40}
41
42// Create cached timer and start runtime timer that updates time every second
43func NewCachedTimer() StoppableTimer {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected