MCPcopy
hub / github.com/g3n/engine / SetInterval

Method SetInterval

core/timer.go:54–57  ·  view source on GitHub ↗

SetInterval sets a periodic timeout with the specified duration and callback The function returns the timeout id which can be used to cancel the timeout

(td time.Duration, arg interface{}, cb TimerCallback)

Source from the content-addressed store, hash-verified

52// SetInterval sets a periodic timeout with the specified duration and callback
53// The function returns the timeout id which can be used to cancel the timeout
54func (tm *TimerManager) SetInterval(td time.Duration, arg interface{}, cb TimerCallback) int {
55
56 return tm.setTimer(td, true, arg, cb)
57}
58
59// ClearTimeout clears the timeout specified by the id.
60// Returns true if the timeout is found.

Callers 1

onMouseMethod · 0.80

Calls 1

setTimerMethod · 0.95

Tested by

no test coverage detected