Module timer

Timer related variables and functions

Functions

reset () Resets the timer's interval count and length back to 0, and its speed back to 1.
destroy () Destroys the timer, freezing its simulated time and disabling its listener.

Fields

elapsedMS How many milliseconds have passed within the current interval.
currentCount How many intervals have been completed.
maxCount How many intervals will be completed.
interval How many milliseconds must pass to complete an interval.
speed A multiplier applied to the simulated elapsed time.
destroyed Whether or not the timer was destroyed.


Functions

reset ()
Resets the timer's interval count and length back to 0, and its speed back to 1.
destroy ()
Destroys the timer, freezing its simulated time and disabling its listener.

Fields

elapsedMS
How many milliseconds have passed within the current interval.
currentCount
How many intervals have been completed.
maxCount
How many intervals will be completed. Set to -1 for infinite intervals.
interval
How many milliseconds must pass to complete an interval.
speed
A multiplier applied to the simulated elapsed time. By default 1. (e.g. a multiplier of 2 makes an interval of 100 milliseconds take only 50 milliseconds to complete)
destroyed
Whether or not the timer was destroyed. Calling destroy sets this to true. Read-only.
generated by LDoc 1.5.0 Last updated 2023-11-25 17:53:31