diff options
author | Rich Trott <rtrott@gmail.com> | 2019-12-25 02:11:21 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-12-27 08:39:32 +0300 |
commit | 7bb1f475c567de38ae06429fec209adb9aee4699 (patch) | |
tree | 9c89180c036af40bb14bcc5e98a00259cef1a90e /doc/api/timers.md | |
parent | cdb727d6db0be76c3ed2585e71c0427809f377fb (diff) |
doc,timers: use code markup/markdown in headers
PR-URL: https://github.com/nodejs/node/pull/31086
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc/api/timers.md')
-rw-r--r-- | doc/api/timers.md | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/doc/api/timers.md b/doc/api/timers.md index 646c0abd1cb..a312022791f 100644 --- a/doc/api/timers.md +++ b/doc/api/timers.md @@ -12,7 +12,7 @@ The timer functions within Node.js implement a similar API as the timers API provided by Web Browsers but use a different internal implementation that is built around the Node.js [Event Loop][]. -## Class: Immediate +## Class: `Immediate` This object is created internally and is returned from [`setImmediate()`][]. It can be passed to [`clearImmediate()`][] in order to cancel the scheduled @@ -23,7 +23,7 @@ running as long as the immediate is active. The `Immediate` object returned by [`setImmediate()`][] exports both `immediate.ref()` and `immediate.unref()` functions that can be used to control this default behavior. -### immediate.hasRef() +### `immediate.hasRef()` <!-- YAML added: v11.0.0 --> @@ -32,7 +32,7 @@ added: v11.0.0 If true, the `Immediate` object will keep the Node.js event loop active. -### immediate.ref() +### `immediate.ref()` <!-- YAML added: v9.7.0 --> @@ -46,7 +46,7 @@ effect. By default, all `Immediate` objects are "ref'ed", making it normally unnecessary to call `immediate.ref()` unless `immediate.unref()` had been called previously. -### immediate.unref() +### `immediate.unref()` <!-- YAML added: v9.7.0 --> @@ -58,7 +58,7 @@ loop to remain active. If there is no other activity keeping the event loop running, the process may exit before the `Immediate` object's callback is invoked. Calling `immediate.unref()` multiple times will have no effect. -## Class: Timeout +## Class: `Timeout` This object is created internally and is returned from [`setTimeout()`][] and [`setInterval()`][]. It can be passed to either [`clearTimeout()`][] or @@ -70,7 +70,7 @@ timer is active. Each of the `Timeout` objects returned by these functions export both `timeout.ref()` and `timeout.unref()` functions that can be used to control this default behavior. -### timeout.hasRef() +### `timeout.hasRef()` <!-- YAML added: v11.0.0 --> @@ -79,7 +79,7 @@ added: v11.0.0 If true, the `Timeout` object will keep the Node.js event loop active. -### timeout.ref() +### `timeout.ref()` <!-- YAML added: v0.9.1 --> @@ -92,7 +92,7 @@ When called, requests that the Node.js event loop *not* exit so long as the By default, all `Timeout` objects are "ref'ed", making it normally unnecessary to call `timeout.ref()` unless `timeout.unref()` had been called previously. -### timeout.refresh() +### `timeout.refresh()` <!-- YAML added: v10.2.0 --> @@ -107,7 +107,7 @@ JavaScript object. Using this on a timer that has already called its callback will reactivate the timer. -### timeout.unref() +### `timeout.unref()` <!-- YAML added: v0.9.1 --> @@ -130,7 +130,7 @@ a certain period of time. When a timer's function is called varies depending on which method was used to create the timer and what other work the Node.js event loop is doing. -### setImmediate(callback\[, ...args\]) +### `setImmediate(callback[, ...args])` <!-- YAML added: v0.9.1 --> @@ -172,7 +172,7 @@ async function timerExample() { timerExample(); ``` -### setInterval(callback, delay\[, ...args\]) +### `setInterval(callback, delay[, ...args])` <!-- YAML added: v0.0.1 --> @@ -190,7 +190,7 @@ set to `1`. Non-integer delays are truncated to an integer. If `callback` is not a function, a [`TypeError`][] will be thrown. -### setTimeout(callback, delay\[, ...args\]) +### `setTimeout(callback, delay[, ...args])` <!-- YAML added: v0.0.1 --> @@ -235,7 +235,7 @@ cancel the timer and prevent it from triggering. It is not possible to cancel timers that were created using the promisified variants of [`setImmediate()`][], [`setTimeout()`][]. -### clearImmediate(immediate) +### `clearImmediate(immediate)` <!-- YAML added: v0.9.1 --> @@ -245,7 +245,7 @@ added: v0.9.1 Cancels an `Immediate` object created by [`setImmediate()`][]. -### clearInterval(timeout) +### `clearInterval(timeout)` <!-- YAML added: v0.0.1 --> @@ -254,7 +254,7 @@ added: v0.0.1 Cancels a `Timeout` object created by [`setInterval()`][]. -### clearTimeout(timeout) +### `clearTimeout(timeout)` <!-- YAML added: v0.0.1 --> |