transferum
    Preparing search index...

    Class IntervalTicker

    Ticker based on setInterval with a configurable interval. Optimized for Node.js and tests with fake timers.

    Key features:

    • Leading edge: callback is invoked via setTimeout(fn, 0) when interval > 0
    • When interval === 0: setInterval(fn, 0) starts immediately (built-in leading-edge for 0)
    • _timeoutId stores the setTimeout ID for leading-edge and is cleared in stop()
    • active checks both timers: _timerId || _timeoutId

    Implements

    Index