* The clearTimeout method cancels an instantiated Timer previously created * by calling setTimeout. * * @param {NodeJS.Timeout|FastTimer} timeout
(timeout)
| 349 | * @param {NodeJS.Timeout|FastTimer} timeout |
| 350 | */ |
| 351 | clearTimeout (timeout) { |
| 352 | // If the timeout is a FastTimer, call its own clear method. |
| 353 | if (timeout[kFastTimer]) { |
| 354 | /** |
| 355 | * @type {FastTimer} |
| 356 | */ |
| 357 | timeout.clear() |
| 358 | // Otherwise it is an instance of a native NodeJS.Timeout, so call the |
| 359 | // Node.js native clearTimeout function. |
| 360 | } else { |
| 361 | clearTimeout(timeout) |
| 362 | } |
| 363 | }, |
| 364 | /** |
| 365 | * The setFastTimeout() method sets a fastTimer which executes a function once |
| 366 | * the timer expires. |
no test coverage detected