* Sets the timer's start time to the current time, and reschedules the timer * to call its callback at the previously specified duration adjusted to the * current time. * Using this on a timer that has already called its callback will reactivate * the timer.
()
| 2536 | * @returns {void} |
| 2537 | */ |
| 2538 | refresh() { |
| 2539 | if (this._state === NOT_IN_LIST) { |
| 2540 | fastTimers.push(this); |
| 2541 | } |
| 2542 | if (!fastNowTimeout || fastTimers.length === 1) { |
| 2543 | refreshTimeout(); |
| 2544 | } |
| 2545 | this._state = PENDING; |
| 2546 | } |
| 2547 | /** |
| 2548 | * The `clear` method cancels the timer, preventing it from executing. |
| 2549 | * |
no test coverage detected