• Home
  • Raw
  • Download

Lines Matching full:timeout

76 ## Class: `Timeout`
84 timer is active. Each of the `Timeout` objects returned by these functions
85 export both `timeout.ref()` and `timeout.unref()` functions that can be used to
88 ### `timeout.close()`
96 * Returns: {Timeout} a reference to `timeout`
98 Cancels the timeout.
100 ### `timeout.hasRef()`
108 If true, the `Timeout` object will keep the Node.js event loop active.
110 ### `timeout.ref()`
116 * Returns: {Timeout} a reference to `timeout`
119 `Timeout` is active. Calling `timeout.ref()` multiple times will have no effect.
121 By default, all `Timeout` objects are "ref'ed", making it normally unnecessary
122 to call `timeout.ref()` unless `timeout.unref()` had been called previously.
124 ### `timeout.refresh()`
130 * Returns: {Timeout} a reference to `timeout`
140 ### `timeout.unref()`
146 * Returns: {Timeout} a reference to `timeout`
148 When called, the active `Timeout` object will not require the Node.js event loop
150 the process may exit before the `Timeout` object's callback is invoked. Calling
151 `timeout.unref()` multiple times will have no effect.
153 ### `timeout[Symbol.toPrimitive]()`
161 * Returns: {integer} a number that can be used to reference this `timeout`
163 Coerce a `Timeout` to a primitive. The primitive can be used to
164 clear the `Timeout`. The primitive can only be used in the
165 same thread where the timeout was created. Therefore, to use it
170 ### `timeout[Symbol.dispose]()`
178 Cancels the timeout.
234 * Returns: {Timeout} for use with [`clearInterval()`][]
262 * Returns: {Timeout} for use with [`clearTimeout()`][]
319 console.error('The timeout was aborted');
336 ### `clearInterval(timeout)`
342 * `timeout` {Timeout|string|number} A `Timeout` object as returned by [`setInterval()`][]
343 or the [primitive][] of the `Timeout` object as a string or a number.
345 Cancels a `Timeout` object created by [`setInterval()`][].
347 ### `clearTimeout(timeout)`
353 * `timeout` {Timeout|string|number} A `Timeout` object as returned by [`setTimeout()`][]
354 or the [primitive][] of the `Timeout` object as a string or a number.
356 Cancels a `Timeout` object created by [`setTimeout()`][].
398 * `ref` {boolean} Set to `false` to indicate that the scheduled `Timeout`
402 cancel the scheduled `Timeout`.
472 * `ref` {boolean} Set to `false` to indicate that the scheduled `Timeout`
477 cancel the scheduled `Timeout` between operations.