* 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. *
()
| 1198 | * @returns {void} |
| 1199 | */ |
| 1200 | refresh() { |
| 1201 | if (this._state === NOT_IN_LIST) { |
| 1202 | fastTimers.push(this); |
| 1203 | } |
| 1204 | if (!fastNowTimeout || fastTimers.length === 1) { |
| 1205 | refreshTimeout(); |
| 1206 | } |
| 1207 | this._state = PENDING; |
| 1208 | } |
| 1209 | /** |
| 1210 | * The `clear` method cancels the timer, preventing it from executing. |
| 1211 | * |