Timers
JavaScript Timers
Implements intrinsic JavaScript timers, at the familiar symbols setTimeout
and setInterval
; each method starts a timer task which is dispatched after a specified delay. Interval timers repeat their execution until canceled, while regular one-shot timers execute only once.
Note that parameters are reversed for the host-side versions of these methods. JavaScript setTimeout
takes the callback value first, for example, and the delay second; setTimeout takes the delay first so that the callback can use Kotlin's lambda syntax.
Functions
Cancels a repeated timer task previously scheduled with setTimeout.
Cancels a one-shot timer task previously scheduled with setTimeout.
Schedules a callback to be called repeatedly, each time after a delay. This method takes a JVM callback.
Schedules a callback to be called repeatedly, each time after a delay. This method variant takes a polyglot Value.
Schedules a callback to be called after a delay. This method takes a JVM callback.
Schedules a callback to be called after a delay. This method variant takes a polyglot Value.