Skip to content

Commit 7fdb127

Browse files
galkinBethGriggs
authored andcommittedSep 21, 2021
doc: add timeout.close
PR-URL: #40036 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent effdfa9 commit 7fdb127

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

‎doc/api/timers.md

+11
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ timer is active. Each of the `Timeout` objects returned by these functions
7272
export both `timeout.ref()` and `timeout.unref()` functions that can be used to
7373
control this default behavior.
7474

75+
### `timeout.close()`
76+
<!-- YAML
77+
added: v0.9.1
78+
-->
79+
80+
> Stability: 3 - Legacy: Use [`clearTimeout()`][] instead.
81+
82+
* Returns: {Timeout} a reference to `timeout`
83+
84+
Cancels the timeout.
85+
7586
### `timeout.hasRef()`
7687
<!-- YAML
7788
added: v11.0.0

0 commit comments

Comments
 (0)
Please sign in to comment.