Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Open source

timers

Caution

This is an experimental module.

While we intend to keep experimental modules as stable as possible, we may need to introduce breaking changes. This could happen at future k6 releases until the module becomes fully stable and graduates as a k6 core module. For more information, refer to the extension graduation process.

Experimental modules maintain a high level of stability and follow regular maintenance and security measures. Feel free to open an issue if you have any feedback or suggestions.

This modules implements the commonly found in browsers:

FunctionDescription
setTimeoutsets a function to be run after a given timeout
clearTimeoutclears a previously set timeout with setTimeout
setIntervalsets a function to be run on a given interval
clearIntervalclears a previously set interval with setInterval