gameplate - v2.3.0
    Preparing search index...

    Interface Scheduler

    A Scheduler decouples the loop from requestAnimationFrame/setTimeout, so tests can drive it with a fake clock without ever touching real time.

    Default schedulers exist for the browser (rAF) and Node (setImmediate).

    interface Scheduler {
        now: () => number;
        schedule: (callback: (timestamp: number) => void) => () => void;
    }
    Index

    Properties

    Properties

    now: () => number

    Current high-resolution time in milliseconds.

    schedule: (callback: (timestamp: number) => void) => () => void

    Schedule callback for the next frame. The timestamp arg matches now() at the time the callback fires.

    Returns a cancel function.