Skip to content

Commit 3bb8a6a

Browse files
tflanaganrvagg
authored andcommitted
doc: sort timers alphabetically
Reorders, with no contextual changes, the timers documentation alphabetically. PR-URL: #3662 Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 79fccc5 commit 3bb8a6a

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

doc/api/timers.markdown

+37-37
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,38 @@
55
All of the timer functions are globals. You do not need to `require()`
66
this module in order to use them.
77

8-
## setTimeout(callback, delay[, arg][, ...])
8+
## clearImmediate(immediateObject)
99

10-
To schedule execution of a one-time `callback` after `delay` milliseconds. Returns a
11-
`timeoutObject` for possible use with `clearTimeout()`. Optionally you can
12-
also pass arguments to the callback.
10+
Stops an immediate from triggering.
1311

14-
It is important to note that your callback will probably not be called in exactly
15-
`delay` milliseconds - Node.js makes no guarantees about the exact timing of when
16-
the callback will fire, nor of the ordering things will fire in. The callback will
17-
be called as close as possible to the time specified.
12+
## clearInterval(intervalObject)
1813

19-
To follow browser behavior, when using delays larger than 2147483647
20-
milliseconds (approximately 25 days) or less than 1, the timeout is executed
21-
immediately, as if the `delay` was set to 1.
14+
Stops an interval from triggering.
2215

2316
## clearTimeout(timeoutObject)
2417

2518
Prevents a timeout from triggering.
2619

20+
## ref()
21+
22+
If you had previously `unref()`d a timer you can call `ref()` to explicitly
23+
request the timer hold the program open. If the timer is already `ref`d calling
24+
`ref` again will have no effect.
25+
26+
Returns the timer.
27+
28+
## setImmediate(callback[, arg][, ...])
29+
30+
To schedule the "immediate" execution of `callback` after I/O events
31+
callbacks and before `setTimeout` and `setInterval` . Returns an
32+
`immediateObject` for possible use with `clearImmediate()`. Optionally you
33+
can also pass arguments to the callback.
34+
35+
Callbacks for immediates are queued in the order in which they were created.
36+
The entire callback queue is processed every event loop iteration. If you queue
37+
an immediate from inside an executing callback, that immediate won't fire
38+
until the next event loop iteration.
39+
2740
## setInterval(callback, delay[, arg][, ...])
2841

2942
To schedule the repeated execution of `callback` every `delay` milliseconds.
@@ -34,9 +47,20 @@ To follow browser behavior, when using delays larger than 2147483647
3447
milliseconds (approximately 25 days) or less than 1, Node.js will use 1 as the
3548
`delay`.
3649

37-
## clearInterval(intervalObject)
50+
## setTimeout(callback, delay[, arg][, ...])
3851

39-
Stops an interval from triggering.
52+
To schedule execution of a one-time `callback` after `delay` milliseconds. Returns a
53+
`timeoutObject` for possible use with `clearTimeout()`. Optionally you can
54+
also pass arguments to the callback.
55+
56+
It is important to note that your callback will probably not be called in exactly
57+
`delay` milliseconds - Node.js makes no guarantees about the exact timing of when
58+
the callback will fire, nor of the ordering things will fire in. The callback will
59+
be called as close as possible to the time specified.
60+
61+
To follow browser behavior, when using delays larger than 2147483647
62+
milliseconds (approximately 25 days) or less than 1, the timeout is executed
63+
immediately, as if the `delay` was set to 1.
4064

4165
## unref()
4266

@@ -50,27 +74,3 @@ will wakeup the event loop, creating too many of these may adversely effect
5074
event loop performance -- use wisely.
5175

5276
Returns the timer.
53-
54-
## ref()
55-
56-
If you had previously `unref()`d a timer you can call `ref()` to explicitly
57-
request the timer hold the program open. If the timer is already `ref`d calling
58-
`ref` again will have no effect.
59-
60-
Returns the timer.
61-
62-
## setImmediate(callback[, arg][, ...])
63-
64-
To schedule the "immediate" execution of `callback` after I/O events
65-
callbacks and before `setTimeout` and `setInterval` . Returns an
66-
`immediateObject` for possible use with `clearImmediate()`. Optionally you
67-
can also pass arguments to the callback.
68-
69-
Callbacks for immediates are queued in the order in which they were created.
70-
The entire callback queue is processed every event loop iteration. If you queue
71-
an immediate from inside an executing callback, that immediate won't fire
72-
until the next event loop iteration.
73-
74-
## clearImmediate(immediateObject)
75-
76-
Stops an immediate from triggering.

0 commit comments

Comments
 (0)