TimerUtil
This is a timer utility that allows to keep track of time and run certain code on a specified interval
Creation
Returns a TimerUtil object.
Functions
getTime
Returns the current time of the timer as a Number
reset
This will reset the time elapsed
hasTimeElapsed
Returns true if the timer has elapsed the specified time
Parameter
Type
Description
time
Number
The time elapsed to check in milliseconds
reset (Optional)
Boolean
Set to true if you want to reset the time elapsed if the method returned true
Last updated