Warning
Starting k6 version v0.51 the code of the k6/x/timers
extension is part of the main k6 repository. It can be used without any imports as in other js runtimes, or by importing k6/timers
. Please contribute and open issues there. This repository is no longer maintained.
This extension adds a PoC implementation of setTimeout and friends based on code by @na--
It is implemented using the xk6 system.
- Install
xk6
:
$ go install go.k6.io/xk6/cmd/xk6@latest
- Build the binary:
$ xk6 build --with github.com/grafana/xk6-timers
See ./mdn_example.js