Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TimerManager

Keeps track on timers created with setTimeout to help clearTimeout for all timers when no more delayed actions needed

Hierarchy

  • TimerManager

Index

Constructors

Methods

  • clearAllTimers(): void
  • clearTimer(id: string): void
  • setTimer(name: string, delay: number, fn: Function): string
  • Creates a new timer and returns its ID.

    Parameters

    • name: string

      Readable name for the timer

    • delay: number

      Delay in milliseconds

    • fn: Function

      Callback function that is executed after the timer expires

    Returns string

Generated using TypeDoc