Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add note about timeout delay > TIMEOUT_MAX #3512

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/api/timers.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ It is important to note that your callback will probably not be called in exactl
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.

To follow browser behavior, when using delays larger than 2147483647
milliseconds (approximately 25 days) or less than 1, the timeout is executed
immediately, as if the `delay` was set to 1.

## clearTimeout(timeoutObject)

Prevents a timeout from triggering.
Expand All @@ -26,6 +30,10 @@ To schedule the repeated execution of `callback` every `delay` milliseconds.
Returns a `intervalObject` for possible use with `clearInterval()`. Optionally
you can also pass arguments to the callback.

To follow browser behavior, when using delays larger than 2147483647
milliseconds (approximately 25 days) or less than 1, Node.js will use 1 as the
`delay`.

## clearInterval(intervalObject)

Stops an interval from triggering.
Expand Down