Wrapper over JS timers that allows re-scheduling them to earlier time

Constructors

Methods

  • Emit the timer before the given time

    Parameters

    • ts: number

      timestamp in ms relative to performance.timeOrigin

    Returns void

  • Emit the timer before the next given milliseconds

    Shorthand for emitBefore(performance.now() + ms)

    Parameters

    • ms: number

      Milliseconds to schedule for

    Returns void

  • Emit the timer right now

    Returns void

  • Emit the timer when the event loop is idle (basically queueMicrotask())

    Returns void

  • Set timeout handler

    Parameters

    • handler: () => void

    Returns void

  • Cancel the timer

    Returns void

MMNEPVFCICPMFPCPTTAAATR