Timer.scheduleRepeat() method

Calling scheduleRepeat() queues the timer to be called back repeatedly after the specified delay. The callbacks will continue until the timer is unscheduled, or until the sun goes supernova and consumes the earth.

Syntax

Timer.scheduleRepeat(interval)

Parameters

Return value

None (undefined).

Example

> timer2 = new Timer(() => console.log("Repeat fire!"));
undefined
> timer2.scheduleRepeat(0.1);
undefined
Repeat fire!
Repeat fire!
Repeat fire!
> timer2.delay
100
> timer2.cancel()
undefined

References