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

Function New

kontrol/onceevery/onceevery.go:17–21  ·  view source on GitHub ↗

NewOnceEvery creates a new OnceEvery struct

(d time.Duration)

Source from the content-addressed store, hash-verified

15
16// NewOnceEvery creates a new OnceEvery struct
17func New(d time.Duration) *OnceEvery {
18 return &OnceEvery{
19 Interval: d,
20 }
21}
22
23// Do calls the function f if and only if Do hits the given periodic interval.
24// In other words Do can be called multiple times during the interval but it

Callers 1

TestOnceEveryFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestOnceEveryFunction · 0.56