Add the timer to the heap.
(t *Timer, d time.Duration)
| 17 | |
| 18 | // Add the timer to the heap. |
| 19 | func 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 | |
| 27 | func addTimerLocked(t *Timer) { |
| 28 | t.i = len(timers) |
no test coverage detected
searching dependent graphs…