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

Method ClearTimeout

core/timer.go:61–72  ·  view source on GitHub ↗

ClearTimeout clears the timeout specified by the id. Returns true if the timeout is found.

(id int)

Source from the content-addressed store, hash-verified

59// ClearTimeout clears the timeout specified by the id.
60// Returns true if the timeout is found.
61func (tm *TimerManager) ClearTimeout(id int) bool {
62
63 for pos, t := range tm.timers {
64 if t.id == id {
65 copy(tm.timers[pos:], tm.timers[pos+1:])
66 tm.timers[len(tm.timers)-1] = timeout{}
67 tm.timers = tm.timers[:len(tm.timers)-1]
68 return true
69 }
70 }
71 return false
72}
73
74// ProcessTimers should be called periodically to process the timers
75func (tm *TimerManager) ProcessTimers() {

Callers 1

OnFocusLostMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected