Options
All
  • Public
  • Public/Protected
  • All
Menu

Timer Class.

setTimeout + extra features ( re-starting, pausing, resuming ).

Hierarchy

  • Timer

Index

Constructors

constructor

Properties

Private callback

callback: () => void

Type declaration

    • (): void
    • Callback to be executed once timer finishes.

      Returns void

Private destroyed

destroyed: boolean

Boolean for checking if Timer is destroyed or not.

Private paused

paused: boolean

Boolean for checking if Timer is paused or not.

Private time_left

time_left: number

Total time left.

Private time_start

time_start: number

Seconds time when it is started.

Private time_total

time_total: number

Total time given by user [ Used only for re-using timer. ]

Private timer

setTimeout function

Methods

destroy

  • destroy(): void

pause

  • pause(): boolean

resume

  • resume(): boolean

reuse

  • reuse(): boolean

Generated using TypeDoc