Class: Timer

Timer(callback, duration, stageIndex)

A timer that expires after a certain amount of time.

Constructor

new Timer(callback, duration, stageIndex)

constructor - description

Parameters:
Name Type Description
callback Timer~callback

The code to execute once the timer expires.

duration type

The length of time to wait until the timer expires.

stageIndex type

description

Source:

Members

duration :number

Type:
  • number
Source:

running :boolean

Type:
  • boolean
Default Value:
  • false
Source:

stageIndex :number

Type:
  • number
Source:

timeLeft :number

Type:
  • number
Source:

timeStarted :Date

Type:
  • Date
Source:

Methods

(static) load(ts, d, tl, stageIndex, cb) → {type}

Parameters:
Name Type Description
ts type

description

d type

description

tl type

description

stageIndex type

description

cb type

description

Source:
Returns:

description

Type
type

Type Definitions

callback()

Source: