doc: fix small grammatical issues in timers.md

PR-URL: https://github.com/nodejs/node/pull/35203
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Turner Jabbour authored and Anna Henningsen committed 2020-09-22 23:48:29 +02:00
1 parent 8f2d2aa9e3
commit f050ecc3b1
1 file changed
+7 -8
+7 -8
View File
@@ -130,15 +130,14 @@ of the Node.js application.
added: REPLACEME
-->
* Returns: {integer} number that can be used to reference this `timeout`
* Returns: {integer} a 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.
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