Skip to content

Commit 8bbeaa4

Browse files
addaleaxMyles Borins
authored and
Myles Borins
committed
doc: add added: information for timers
Ref: #6578 PR-URL: #7493 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 0fcaf48 commit 8bbeaa4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/api/timers.md

+24
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,30 @@ All of the timer functions are globals. You do not need to `require()`
66
this module in order to use them.
77

88
## clearImmediate(immediateObject)
9+
<!-- YAML
10+
added: v0.9.1
11+
-->
912

1013
Stops an `immediateObject`, as created by [`setImmediate`][], from triggering.
1114

1215
## clearInterval(intervalObject)
16+
<!-- YAML
17+
added: v0.0.1
18+
-->
1319

1420
Stops an `intervalObject`, as created by [`setInterval`][], from triggering.
1521

1622
## clearTimeout(timeoutObject)
23+
<!-- YAML
24+
added: v0.0.1
25+
-->
1726

1827
Prevents a `timeoutObject`, as created by [`setTimeout`][], from triggering.
1928

2029
## ref()
30+
<!-- YAML
31+
added: v0.9.1
32+
-->
2133

2234
If a timer was previously `unref()`d, then `ref()` can be called to explicitly
2335
request the timer hold the program open. If the timer is already `ref`d calling
@@ -26,6 +38,9 @@ request the timer hold the program open. If the timer is already `ref`d calling
2638
Returns the timer.
2739

2840
## setImmediate(callback[, arg][, ...])
41+
<!-- YAML
42+
added: v0.9.1
43+
-->
2944

3045
Schedules "immediate" execution of `callback` after I/O events'
3146
callbacks and before timers set by [`setTimeout`][] and [`setInterval`][] are
@@ -39,6 +54,9 @@ immediate is queued from inside an executing callback, that immediate won't fire
3954
until the next event loop iteration.
4055

4156
## setInterval(callback, delay[, arg][, ...])
57+
<!-- YAML
58+
added: v0.0.1
59+
-->
4260

4361
Schedules repeated execution of `callback` every `delay` milliseconds.
4462
Returns a `intervalObject` for possible use with [`clearInterval`][]. Additional
@@ -49,6 +67,9 @@ milliseconds (approximately 25 days) or less than 1, Node.js will use 1 as the
4967
`delay`.
5068

5169
## setTimeout(callback, delay[, arg][, ...])
70+
<!-- YAML
71+
added: v0.0.1
72+
-->
5273

5374
Schedules execution of a one-time `callback` after `delay` milliseconds.
5475
Returns a `timeoutObject` for possible use with [`clearTimeout`][]. Additional
@@ -64,6 +85,9 @@ milliseconds (approximately 25 days) or less than 1, the timeout is executed
6485
immediately, as if the `delay` was set to 1.
6586

6687
## unref()
88+
<!-- YAML
89+
added: v0.9.1
90+
-->
6791

6892
The opaque value returned by [`setTimeout`][] and [`setInterval`][] also has the
6993
method `timer.unref()` which allows the creation of a timer that is active but

0 commit comments

Comments
 (0)