RawTimers

object RawTimers

Non-Standard Raw JavaScript timer methods.

The methods on this object expose the raw JavaScript methods for timers. In general it is more advisable to use the methods directly defined on timers as they are more Scala-like.

class Object
trait Matchable
class Any

Value members

Concrete methods

@inline
def setInterval(handler: () => Unit, interval: Double): SetIntervalHandle

Schedule handler for repeated execution every interval milliseconds.

Schedule handler for repeated execution every interval milliseconds.

Value parameters:
handler

the function to call after each interval

interval

duration in milliseconds between executions

Returns:

A handle that can be used to cancel the interval by passing it to clearInterval.

@inline
def setTimeout(handler: () => Unit, interval: Double): SetTimeoutHandle

Schedule handler for execution in interval milliseconds.

Schedule handler for execution in interval milliseconds.

Value parameters:
handler

the function to call after interval has passed

interval

duration in milliseconds to wait

Returns:

A handle that can be used to cancel the timeout by passing it to clearTimeout.