MCPcopy Create free account
hub / github.com/koding/kite / OnceEvery

Struct OnceEvery

kontrol/onceevery/onceevery.go:10–14  ·  view source on GitHub ↗

OnceEvery is an object that will perform exactly one action every given interval.

Source from the content-addressed store, hash-verified

8// OnceEvery is an object that will perform exactly one action every given
9// interval.
10type OnceEvery struct {
11 Interval time.Duration
12 mu sync.Mutex
13 last time.Time
14}
15
16// NewOnceEvery creates a new OnceEvery struct
17func New(d time.Duration) *OnceEvery {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected