timers

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

The experimental module k6/experimental/timers has graduated, and its functionality is now globally available and through the k6/timers module. The k6/experimental/timers is deprecated and will be removed.

To migrate your scripts, remove the k6/experimental/timers imports or import them using the k6/timers module.

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