the clock time in seconds when the callBack should start
the function to execute at the given clock time
Optional
opt_sysClock: SystemClocka SystemClock to use for this Clock (optional)
Private
callthe function to execute at the given clock time
Private
time_the clock time in seconds when the callBack should start
Private
timeoutID_the ID for cancelling the callback, or NaN if not currently scheduled
Generated using TypeDoc
Holds a callback function to be executed at a specified time; used with Clock. ClockTasks are scheduled as a side effect of Clock methods such as
setTime()
,resume()
,addTask()
. ClockTasks are cancelled as a side effect of Clock methods such aspause()
,removeTask()
.Here is an example of a ClockTask that restarts the simulation every 5 seconds. This script can be entered in the command-line Terminal. For example in Single Spring App
Example of a ClockTask that pauses the Clock after 5 seconds:
Example of a ClockTask that slows the time rate the Clock after 5 seconds:
See Clock section Types of Time about clock time and system time.