Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-12-25 02:11:21 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2020-01-03 18:21:57 +0300
commit450d9a27bf883392d7193da95f10c1c57acfe473 (patch)
tree1e501e463afb633c96feb992c64888844a9b7e27 /doc
parentcf563bbd7fa636ca3b6b6e88cab92b854947af0d (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')
-rw-r--r--doc/api/timers.md30
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
-->