Clock
Last updated
Was this helpful?
Last updated
Was this helpful?
ChronoTrigger::Clock
is running the show around here.
Every 100ms () the Clock
commands the scheduler to process any pending events.
Start (or un-pause) the Clock
. Note that events with a before
attribute that has already passed will be purged without being run.
Pause the Clock
.
This will return :started
or :stopped
.
This will return true
or false
, depending on whether the Clock
is currently paused or not.
The counterpart to stopped?
, this will return true
or false
depending on whether the Clock
is currently paused or not.
Here's a trick to flip the current status
:
This will return an Integer representing the number of which have happened since the Clock
was started.