#include <timer.h>
Public Member Functions | |
| Timer (Uint32 mseconds, bool runnning=true) | |
| Create a timer with a given timeout period (in milliseconds). | |
| void | setInterval (unsigned int delta) |
| Set the timeout period. | |
| Uint32 | interval () const |
| Get the timeout period. | |
| void | run () |
| Run the timer. | |
| void | halt () |
| Halt the timer. | |
Static Public Member Functions | |
| static void | processAllTimers () |
| Trigger all timers for which sufficient time has passed. | |
| static Uint32 | limitWait (Uint32 max) |
| returns the lesser of amount of time until the next timer and 'max'. | |
Public Attributes | |
| Alarm | alarm |
| Emitted when the timer is triggered, slots can optionally receive the ammout of time passed. | |
| BaseEvent * | currentEvent_ |
|
|
returns the lesser of amount of time until the next timer and 'max'. This handles the corner case where no timers are running more cleanly than a simple 'get next time' function. |
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.