Reset the timer to the new timeout duration. This clears the channel.
(t *Timer, d time.Duration)
| 73 | // Reset the timer to the new timeout duration. |
| 74 | // This clears the channel. |
| 75 | func 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 | |
| 85 | func reschedule() { |
| 86 | // Do not block if there is already a pending reschedule request. |
no test coverage detected
searching dependent graphs…