Skip to content

Commit 39317ea

Browse files
Basic graduation of k6/timers docs (#1529)
Co-authored-by: Heitor Tashiro Sergent <[email protected]>
1 parent 1d3c4b0 commit 39317ea

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

docs/sources/next/javascript-api/k6-experimental/timers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 03
66

77
# timers
88

9-
{{< docs/shared source="k6" lookup="experimental-module.md" version="<K6_VERSION>" >}}
9+
{{< docs/shared source="k6" lookup="experimental-timers-module.md" version="<K6_VERSION>" >}}
1010

1111
This modules implements the commonly found in browsers:
1212

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "k6/timers"
3+
description: "k6 timers API"
4+
weight: 13
5+
---
6+
7+
# k6/timers
8+
9+
Implement timers to work with k6's event loop. They mimic the functionality found in browsers and other JavaScript runtimes.
10+
11+
| Function | Description |
12+
| :------------------------------------------ | :--------------------------------------------------------------------------------------------- |
13+
| [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) | Sets a function to be run after a given timeout. |
14+
| [clearTimeout](https://developer.mozilla.org/en-US/docs/Web/API/clearTimeout) | Clears a previously set timeout with `setTimeout`. |
15+
| [setInterval](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) | Sets a function to be run on a given interval. |
16+
| [clearInterval](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) | Clears a previously set interval with `setInterval`. |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Experimental timers module admonition
3+
---
4+
5+
{{% admonition type="caution" %}}
6+
7+
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`.
8+
9+
To migrate your scripts, replace all `k6/experimental/timers` imports with `k6/net/timers`.
10+
11+
{{% /admonition %}}

0 commit comments

Comments
 (0)