Code running in a Web Worker has access to the setTimeout and setInterval methods. These methods can be used to throttle long running scripts or for other general timing purposes. Click the buttons to instruct the Worker to set a timeout or interval timer. At each callback of the timer, the Web Worker posts messages which are then displayed by the example.

Timer log: