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