* @constructor * @param {Function} callback A function to be executed after the timer * expires. * @param {number} delay The time, in milliseconds that the timer should wait * before the specified function or code is executed. * @param {*} arg
(callback, delay, arg)
| 267 | * @param {*} arg |
| 268 | */ |
| 269 | constructor (callback, delay, arg) { |
| 270 | this._onTimeout = callback |
| 271 | this._idleTimeout = delay |
| 272 | this._timerArg = arg |
| 273 | |
| 274 | this.refresh() |
| 275 | } |
| 276 | |
| 277 | /** |
| 278 | * Sets the timer's start time to the current time, and reschedules the timer |