Applications and Geodes: 4.2 General System Utilities: Using Timers

Up: GEOS SDK TechDocs | Up | Prev: 4.1 System Clock | Next: 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.


Up: GEOS SDK TechDocs | Up | Prev: 4.1 System Clock | Next: 4.3 System Statistics and Utilities