@@ -6,18 +6,30 @@ All of the timer functions are globals. You do not need to `require()`
6
6
this module in order to use them.
7
7
8
8
## clearImmediate(immediateObject)
9
+ <!-- YAML
10
+ added: v0.9.1
11
+ -->
9
12
10
13
Stops an ` immediateObject ` , as created by [ ` setImmediate ` ] [ ] , from triggering.
11
14
12
15
## clearInterval(intervalObject)
16
+ <!-- YAML
17
+ added: v0.0.1
18
+ -->
13
19
14
20
Stops an ` intervalObject ` , as created by [ ` setInterval ` ] [ ] , from triggering.
15
21
16
22
## clearTimeout(timeoutObject)
23
+ <!-- YAML
24
+ added: v0.0.1
25
+ -->
17
26
18
27
Prevents a ` timeoutObject ` , as created by [ ` setTimeout ` ] [ ] , from triggering.
19
28
20
29
## ref()
30
+ <!-- YAML
31
+ added: v0.9.1
32
+ -->
21
33
22
34
If a timer was previously ` unref() ` d, then ` ref() ` can be called to explicitly
23
35
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
26
38
Returns the timer.
27
39
28
40
## setImmediate(callback[ , arg] [ , ... ] )
41
+ <!-- YAML
42
+ added: v0.9.1
43
+ -->
29
44
30
45
Schedules "immediate" execution of ` callback ` after I/O events'
31
46
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
39
54
until the next event loop iteration.
40
55
41
56
## setInterval(callback, delay[ , arg] [ , ... ] )
57
+ <!-- YAML
58
+ added: v0.0.1
59
+ -->
42
60
43
61
Schedules repeated execution of ` callback ` every ` delay ` milliseconds.
44
62
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
49
67
` delay ` .
50
68
51
69
## setTimeout(callback, delay[ , arg] [ , ... ] )
70
+ <!-- YAML
71
+ added: v0.0.1
72
+ -->
52
73
53
74
Schedules execution of a one-time ` callback ` after ` delay ` milliseconds.
54
75
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
64
85
immediately, as if the ` delay ` was set to 1.
65
86
66
87
## unref()
88
+ <!-- YAML
89
+ added: v0.9.1
90
+ -->
67
91
68
92
The opaque value returned by [ ` setTimeout ` ] [ ] and [ ` setInterval ` ] [ ] also has the
69
93
method ` timer.unref() ` which allows the creation of a timer that is active but
0 commit comments