Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
doc: changed timer id to object
Browse files Browse the repository at this point in the history
fix #7074
  • Loading branch information
makepanic authored and indutny committed Feb 12, 2014
1 parent dee5270 commit b222374
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doc/api/timers.markdown
Expand Up @@ -8,25 +8,25 @@ this module in order to use them.
## setTimeout(callback, delay, [arg], [...])

To schedule execution of a one-time `callback` after `delay` milliseconds. Returns a
`timeoutId` for possible use with `clearTimeout()`. Optionally you can
`timeoutObject` for possible use with `clearTimeout()`. Optionally you can
also pass arguments to the callback.

It is important to note that your callback will probably not be called in exactly
`delay` milliseconds - Node.js makes no guarantees about the exact timing of when
the callback will fire, nor of the ordering things will fire in. The callback will
be called as close as possible to the time specified.

## clearTimeout(timeoutId)
## clearTimeout(timeoutObject)

Prevents a timeout from triggering.

## setInterval(callback, delay, [arg], [...])

To schedule the repeated execution of `callback` every `delay` milliseconds.
Returns a `intervalId` for possible use with `clearInterval()`. Optionally
Returns a `intervalObject` for possible use with `clearInterval()`. Optionally
you can also pass arguments to the callback.

## clearInterval(intervalId)
## clearInterval(intervalObject)

Stops a interval from triggering.

Expand All @@ -51,7 +51,7 @@ request the timer hold the program open. If the timer is already `ref`d calling

To schedule the "immediate" execution of `callback` after I/O events
callbacks and before `setTimeout` and `setInterval` . Returns an
`immediateId` for possible use with `clearImmediate()`. Optionally you
`immediateObject` for possible use with `clearImmediate()`. Optionally you
can also pass arguments to the callback.

Immediates are queued in the order created, and are popped off the queue once
Expand All @@ -61,6 +61,6 @@ will yield to the event loop after firing a queued callback to make sure I/O is
not being starved. While order is preserved for execution, other I/O events may
fire between any two scheduled immediate callbacks.

## clearImmediate(immediateId)
## clearImmediate(immediateObject)

Stops an immediate from triggering.

0 comments on commit b222374

Please sign in to comment.