(t *time.Timer, timeout time.Duration)
| 6 | ) |
| 7 | |
| 8 | func initTimer(t *time.Timer, timeout time.Duration) *time.Timer { |
| 9 | if t == nil { |
| 10 | return time.NewTimer(timeout) |
| 11 | } |
| 12 | if t.Reset(timeout) { |
| 13 | // developer sanity-check |
| 14 | panic("BUG: active timer trapped into initTimer()") |
| 15 | } |
| 16 | return t |
| 17 | } |
| 18 | |
| 19 | func stopTimer(t *time.Timer) { |
| 20 | if !t.Stop() { |
no test coverage detected
searching dependent graphs…