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

Function addTimer

timers.go:19–25  ·  view source on GitHub ↗

Add the timer to the heap.

(t *Timer, d time.Duration)

Source from the content-addressed store, hash-verified

17
18// Add the timer to the heap.
19func addTimer(t *Timer, d time.Duration) {
20 t.when = time.Now().Add(d)
21
22 mutex.Lock()
23 addTimerLocked(t)
24 mutex.Unlock()
25}
26
27func addTimerLocked(t *Timer) {
28 t.i = len(timers)

Callers 1

NewTimerFunction · 0.85

Calls 1

addTimerLockedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…