Skip to content

Commit

Permalink
doc: fix small grammatical issues in timers.md
Browse files Browse the repository at this point in the history
PR-URL: #35203
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
wjabbour authored and Trott committed Sep 17, 2020
1 parent c314c04 commit 59ca56e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions doc/api/timers.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,14 @@ of the Node.js application.
added: v14.9.0
-->

* Returns: {integer} number that can be used to reference this `timeout`

Coerce a `Timeout` to a primitive, a primitive will be generated that
can be used to clear the `Timeout`.
The generated number can only be used in the same thread where timeout
was created. Therefore to use it cross [`worker_threads`][] it has
to first be passed to a correct thread.
This allows enhanced compatibility with browser's `setTimeout()`, and
`setInterval()` implementations.
* Returns: {integer} a number that can be used to reference this `timeout`

Coerce a `Timeout` to a primitive. The primitive can be used to
clear the `Timeout`. The primitive can only be used in the
same thread where the timeout was created. Therefore, to use it
across [`worker_threads`][] it must first be passed to the correct
thread. This allows enhanced compatibility with browser
`setTimeout()` and `setInterval()` implementations.

## Scheduling timers

Expand Down

0 comments on commit 59ca56e

Please sign in to comment.