Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Scheduler

Default Scheduler

Hierarchy

  • Scheduler

Implements

Index

Constructors

Methods

Constructors

constructor

Methods

asap

  • Compared to Promise.resolve() asap is a little better —

    1. This mimics the exact same behavior of Promise.resolve()
    2. It enables efficient cancellation of jobs.

    Type parameters

    • T: unknown[]

    Parameters

    • fn: function
        • (...t: T): unknown
        • Parameters

          • Rest ...t: T

          Returns unknown

    • Rest ...args: T

    Returns ICancellable

delay

  • delay<T>(fn: function, duration: number, ...args: T): ICancellable
  • Some sugar over the native setTimeout() functionality

    Type parameters

    • T: unknown[]

    Parameters

    • fn: function
        • (...t: T): unknown
        • Parameters

          • Rest ...t: T

          Returns unknown

    • duration: number
    • Rest ...args: T

    Returns ICancellable

now

  • now(): number

Generated using TypeDoc