Reset reschedules the next fire time to the current simulated time + d. Reset reports whether the timer was still active before the reset.
(d time.Duration)
| 665 | // Reset reschedules the next fire time to the current simulated time + d. |
| 666 | // Reset reports whether the timer was still active before the reset. |
| 667 | func (t *Timer) Reset(d time.Duration) bool { |
| 668 | if d <= 0 { |
| 669 | // The standard time.Timer requires a positive delay. |
| 670 | panic("non-positive delay for Timer.Reset") |
| 671 | } |
| 672 | |
| 673 | return t.reset(t.em.Now().Add(d)) |
| 674 | } |
| 675 | |
| 676 | // ResetAbsolute reschedules the next fire time to nextTrigger. |
| 677 | // ResetAbsolute reports whether the timer was still active before the reset. |
no test coverage detected