Options
All
  • Public
  • Public/Protected
  • All
Menu

Package timer

@typed/timer

Interfaces for working with time. Immensely useful for testing time dependent functionality.

Index

Type aliases

RequestIdleCallbackDeadline

RequestIdleCallbackDeadline: { didTimeout: boolean; timeRemaining: () => number }

Type declaration

  • Readonly didTimeout: boolean
  • timeRemaining: () => number
      • (): number
      • Returns number

Functions

Const createClock

Const createRelativeClock

createSetTimeoutTimer

createTimer

createVirtualClock

createVirtualTimer

interval

  • interval(fn: Arity1<number, Disposable>, interval: number, timer: Timer): Disposable
  • Call a function at a given interval using a Timer.

    Parameters

    • fn: Arity1<number, Disposable>

      :: (number -> *)

    • interval: number

      :: number

    • timer: Timer

      :: Timer

    Returns Disposable

    :: Disposable

whenIdle

whenIdleWithTimeout

Generated using TypeDoc