MCPcopy Create free account
hub / github.com/desertbit/timer / resetTimer

Function resetTimer

timers.go:75–83  ·  view source on GitHub ↗

Reset the timer to the new timeout duration. This clears the channel.

(t *Timer, d time.Duration)

Source from the content-addressed store, hash-verified

73// Reset the timer to the new timeout duration.
74// This clears the channel.
75func resetTimer(t *Timer, d time.Duration) (b bool) {
76 mutex.Lock()
77 b = delTimerLocked(t)
78 t.reset()
79 t.when = time.Now().Add(d)
80 addTimerLocked(t)
81 mutex.Unlock()
82 return
83}
84
85func reschedule() {
86 // Do not block if there is already a pending reschedule request.

Callers 1

ResetMethod · 0.85

Calls 2

delTimerLockedFunction · 0.85
addTimerLockedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…