scala.scalajs.js

timers

package timers

Non-Standard Non-standard, but in general well supported methods to schedule asynchronous exeuction.

The methods in this package work in all JavaScript virtual machines supported by Scala.js (currently Rhino, Node.js and PhantomJS).

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. timers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait SetIntervalHandle extends Any

    Non-Standard A handle returned from a call to setInterval.

  2. trait SetTimeoutHandle extends Any

    Non-Standard A handle returned from a call to setTimeout.

Value Members

  1. object RawTimers extends Object

    Non-Standard Raw JavaScript timer methods.

  2. def clearInterval(handle: SetIntervalHandle): Unit

    Cancel an interval execution

    Cancel an interval execution

    handle

    The handle returned by setInterval.

    Note

    Uses JavaScript's non-standard clearInterval

  3. def clearTimeout(handle: SetTimeoutHandle): Unit

    Cancel a timeout execution

    Cancel a timeout execution

    handle

    The handle returned by setTimeout.

    Note

    Uses JavaScript's non-standard clearTimeout

  4. def setInterval(interval: FiniteDuration)(body: ⇒ Unit): SetIntervalHandle

    Schedule something for repeated execution every duration.

    Schedule something for repeated execution every duration.

    interval

    duration between executions

    body

    code to execute after each interval

    returns

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

    Note

    Uses JavaScript's non-standard setInterval

  5. def setInterval(interval: Double)(body: ⇒ Unit): SetIntervalHandle

    Schedule something for repeated execution every interval milliseconds.

    Schedule something for repeated execution every interval milliseconds.

    interval

    duration in milliseconds between executions

    body

    code to execute after each interval

    returns

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

    Note

    Uses JavaScript's non-standard setInterval

  6. def setTimeout(interval: FiniteDuration)(body: ⇒ Unit): SetTimeoutHandle

    Schedule something for execution after a duration.

    Schedule something for execution after a duration.

    interval

    duration to wait

    body

    code to execute after interval has passed

    returns

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

    Note

    Uses JavaScript's non-standard setTimeout

  7. def setTimeout(interval: Double)(body: ⇒ Unit): SetTimeoutHandle

    Schedule something for execution in interval milliseconds.

    Schedule something for execution in interval milliseconds.

    interval

    duration in milliseconds to wait

    body

    code to execute after interval has passed

    returns

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

    Note

    Uses JavaScript's non-standard setTimeout

Inherited from AnyRef

Inherited from scala.Any

Ungrouped