Menu
Open source
timers
Caution
Starting on k6
v0.50
, the experimental modulek6/experimental/timers
has been graduated, and its functionality is now available in thek6/timers
module. Thek6/experimental/timers
is deprecated and will be removed inv0.52.0
.To migrate your scripts, replace all
k6/experimental/timers
imports withk6/timers
.
This modules implements the commonly found in browsers:
Function | Description |
---|---|
setTimeout | sets a function to be run after a given timeout |
clearTimeout | clears a previously set timeout with setTimeout |
setInterval | sets a function to be run on a given interval |
clearInterval | clears a previously set interval with setInterval |
Was this page helpful?
Related documentation
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video
Performance testing and observability in Grafana Cloud
In this webinar, learn how Grafana Cloud k6 offers you the best developer experience for performance testing.
User-centered observability: load testing, real user monitoring, and synthetics
Learn how to use load testing, synthetic monitoring, and real user monitoring (RUM) to understand end users' experience of your apps. Watch on demand.