GEOS SDK TechDocs
|
|
4.1 System Clock
|
4.3 System Statistics and Utilities
TimerStart(), TimerStop(), TimerSleep(), TimerGetCount()
If your geode needs an action to happen on a timed basis, you will want to use a timer. GEOS lets you set up timers that will call a routine or send a message after a given interval has passed. GEOS offers four types of timers:
All timers except sleep timers are created and started with the routine
TimerStart()
, and continual timers can be destroyed with
TimerStop()
.
TimerStop()
may also be used to prematurely stop a one-shot timer, though if the one-shot sent a message, the message could be in the recipient's queue even after
TimerStop()
was called.
Sleep timers are created and started with
TimerSleep()
, and they do not need to be stopped.
An additional routine,
TimerGetCount()
, returns the current system counter. The system counter contains the number of ticks counted since GEOS was started.
GEOS SDK TechDocs
|
|
4.1 System Clock
|
4.3 System Statistics and Utilities