All intervals and timeouts registered on
this.clock are cleared automatically when
Room is disposed.
clock.setInterval(callback, time, ...args): Delayed¶
setInterval() method repeatedly calls a function or executes a code
snippet, with a fixed time delay between each call. It returns
Delayed instance which identifies the interval, so you can
manipulate it later.
clock.setTimeout(callback, time, ...args): Delayed¶
setTimeout() method sets a timer which executes a function or specified
piece of code once after the timer expires. It returns
instance which identifies the interval, so you can manipulate it later.
Clear all intervals and timeouts registered with
Start counting time.
Stop counting time.
This method is called automatically at every simulation interval step. All
Delayed instances are checked during
See Room#setSimiulationInterval() for more details.
Elased time in milliseconds since
clock.start() method was called. Read only.
Current time in milliseconds. Read only.
The difference in milliseconds between the last and current
clock.tick() call. Read only.
Clears the timeout or interval.
Reset the elapsed time.
true if timer is still running.