Implementation of a SystemClock for testing. We can advance the time manually via tick, and then scheduled callbacks will be executed as appropriate.

Implements

Methods

  • requests that the callback be executed before the next repaint.

    Parameters

    • callback: (() => void)

      the function to be called

        • (): void
        • Returns void

    Returns number

    the request ID

  • schedules a callback to be executed in the future.

    Parameters

    • callback: (() => void)

      the function to be called

        • (): void
        • Returns void

    • delay_ms: number

      number of milliseconds to wait before executing the callback

    Returns number

    the ID of the callback

  • Returns the current time as given by the system clock, in seconds.

    Returns number

    the current time as given by the system clock, in seconds

  • Advances the system time and executes any scheduled callbacks whose time has come.

    Parameters

    • advance_ms: number

      how much time to advance in milliseconds

    Returns void

Generated using TypeDoc