Timer
API overview
Constructor
Attributes
Public attributes
currentCount: Number | |
delay: Number | |
elapsed: Number | read-only |
onComplete: TimerCallback | |
onPause: TimerCallback | |
onStart: TimerCallback | |
onStop: TimerCallback | |
repeats: Boolean | |
running: Boolean | read-only |
Protected attributes
Functions
Public functions
pause (): Void |
Pauses the Timer |
play (): Void |
Plays a timer after a pause |
reset (): Void | |
start (): Void |
Starts the timer, will call the onStart() delegate on this Timer instance and add it to the list of timer objects |
stop (): Void |
Stops the Timer and resets the elapsed time back to zero |
Protected functions
Constructor
Timer ( delay: Number = 0.0 )
Attributes
currentCount: Number
delay: Number
elapsed: Number
read-only
onComplete: TimerCallback
onPause: TimerCallback
onStart: TimerCallback
onStop: TimerCallback
repeats: Boolean
running: Boolean
read-only
Protected attributes
Functions
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
String | fully qualified type name of the Object. |
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
Type | The Type that describes the object. |
getTypeName
(): String
Inherited from Object
native
Gets the type name of the Object.
Returns
String | type name of the Object. |
pause (): Void
Pauses the Timer. Will call the onPause() delegate on this Timer instance and remove it from the list of timer objects.
start (): Void
Starts the timer, will call the onStart() delegate on this Timer instance and add it to the list of timer objects.
stop (): Void
Stops the Timer and resets the elapsed time back to zero. Will call the onStop() delegate on this Timer instance and remove it from the list of timer objects.