Skip to content

Commit de369ac

Browse files
committed
doc: add more info for timer.setInterval
1 parent 806ea92 commit de369ac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/api/timers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,8 @@ added: v15.9.0
442442
-->
443443

444444
Returns an async iterator that generates values in an interval of `delay` ms.
445+
If `ref` is `true`, you need to call `next` of async iterator explicitly
446+
or implicitly to keep the event loop alive.
445447

446448
* `delay` {number} The number of milliseconds to wait between iterations.
447449
**Default:** `1`.

0 commit comments

Comments
 (0)