Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic graduation of k6/timers docs (#1529)
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
- Loading branch information
1 parent
1d3c4b0
commit 39317ea
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: "k6/timers" | ||
description: "k6 timers API" | ||
weight: 13 | ||
--- | ||
|
||
# k6/timers | ||
|
||
Implement timers to work with k6's event loop. They mimic the functionality found in browsers and other JavaScript runtimes. | ||
|
||
| Function | Description | | ||
| :------------------------------------------ | :--------------------------------------------------------------------------------------------- | | ||
| [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) | Sets a function to be run after a given timeout. | | ||
| [clearTimeout](https://developer.mozilla.org/en-US/docs/Web/API/clearTimeout) | Clears a previously set timeout with `setTimeout`. | | ||
| [setInterval](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) | Sets a function to be run on a given interval. | | ||
| [clearInterval](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) | Clears a previously set interval with `setInterval`. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Experimental timers module admonition | ||
--- | ||
|
||
{{% admonition type="caution" %}} | ||
|
||
Starting on k6 `v0.50`, the experimental module `k6/experimental/timers` has been graduated, and its functionality is now available in the [`k6/net/timers` module](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-timers/). The `k6/experimental/timers` is deprecated and will be removed in `v0.52.0`. | ||
|
||
To migrate your scripts, replace all `k6/experimental/timers` imports with `k6/net/timers`. | ||
|
||
{{% /admonition %}} |