Node TAP
    Preparing search index...

    Class Timer

    A Timer that lives in the mock clock

    Index
    • Parameters

      • clock: Clock
      • w: number
      • f: (...a: any[]) => any

      Returns Timer

    _onTimeout: ((...a: any[]) => any) | null

    use the property name _onTimeout so that the global clearTimeout method in Node will make it no-op if it gets passed there.

    clock: Clock

    Clock governing this timer

    reffed: boolean

    set by Timer#unref

    These timers don't keep the event loop open anyway, so this doesn't do much, but it's useful when testing to ensure that a timeout had .ref() or .unref() called on it.

    w: number

    When this timer should fire

    • Remove this timer from the clock's queue.

      Returns void

    • simulacrum of node's Timer.ref. Just sets the Timer#ref field.

      Returns void

    • simulacrum of node's Timer.unref. Just sets the Timer#ref field.

      Returns void