transferum
    Preparing search index...

    Interface TickerInterface

    Ticker interface — an abstraction over periodic callback invocation. Two implementations: RAFTicker (browser, requestAnimationFrame) and IntervalTicker (Node.js, setInterval).

    interface TickerInterface {
        active: boolean;
        interval: number;
        restart(): void;
        start(): void;
        stop(): void;
        toggle(): boolean;
        updateInterval(delay: number): void;
    }

    Implemented by

    Index
    active: boolean

    Whether the ticker is active (running)

    interval: number

    Interval in milliseconds

    • Start the ticker (with a leading-edge call)

      Returns void

    • Toggle state (start/stop), returns the new state

      Returns boolean

    • Update interval on the fly (restarts the ticker if active)

      Parameters

      • delay: number

      Returns void