@gibme/timer
    Preparing search index...

    Class Timer

    Hierarchy

    • EventEmitter
      • Timer
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Constructs a new instance of the timer

      Note: If additional arguments are specified, then those arguments will be provided with every tick event emitted except arguments that may be included with calls to the tick() method.

      Parameters

      • interval: number
      • autoStart: boolean = false
      • ...args: any[]

      Returns Timer

    Properties

    interval: number
    paused: boolean = true

    Accessors

    • get destroyed(): boolean

      Returns if the timer has been destroyed

      Returns boolean

    Methods

    • Destroys the timer

      Note: This is destructive, once destroyed, it cannot be restarted

      Returns void

    • Starts the timer

      Returns void

    • Stops the timer

      Returns void

    • Forces a tick event to be emitted with the specified arguments

      Parameters

      • ...args: any[]

      Returns void

    • Toggles the timer on/off

      Returns boolean

      boolean whether the timer is running or not