• Home
  • Raw
  • Download

Lines Matching full:timeout

63 ## Class: `Timeout`
71 timer is active. Each of the `Timeout` objects returned by these functions
72 export both `timeout.ref()` and `timeout.unref()` functions that can be used to
75 ### `timeout.hasRef()`
82 If true, the `Timeout` object will keep the Node.js event loop active.
84 ### `timeout.ref()`
89 * Returns: {Timeout} a reference to `timeout`
92 `Timeout` is active. Calling `timeout.ref()` multiple times will have no effect.
94 By default, all `Timeout` objects are "ref'ed", making it normally unnecessary
95 to call `timeout.ref()` unless `timeout.unref()` had been called previously.
97 ### `timeout.refresh()`
102 * Returns: {Timeout} a reference to `timeout`
112 ### `timeout.unref()`
117 * Returns: {Timeout} a reference to `timeout`
119 When called, the active `Timeout` object will not require the Node.js event loop
121 the process may exit before the `Timeout` object's callback is invoked. Calling
122 `timeout.unref()` multiple times will have no effect.
124 Calling `timeout.unref()` creates an internal timer that will wake the Node.js
128 ### `timeout[Symbol.toPrimitive]()`
133 * Returns: {integer} a number that can be used to reference this `timeout`
135 Coerce a `Timeout` to a primitive. The primitive can be used to
136 clear the `Timeout`. The primitive can only be used in the
137 same thread where the timeout was created. Therefore, to use it
200 * Returns: {Timeout} for use with [`clearInterval()`][]
218 * Returns: {Timeout} for use with [`clearTimeout()`][]
287 console.log('The timeout was aborted');
303 ### `clearInterval(timeout)`
308 * `timeout` {Timeout|string|number} A `Timeout` object as returned by [`setInterval()`][]
309 or the [primitive][] of the `Timeout` object as a string or a number.
311 Cancels a `Timeout` object created by [`setInterval()`][].
313 ### `clearTimeout(timeout)`
318 * `timeout` {Timeout|string|number} A `Timeout` object as returned by [`setTimeout()`][]
319 or the [primitive][] of the `Timeout` object as a string or a number.
321 Cancels a `Timeout` object created by [`setTimeout()`][].