45 for (std::list<TimerID>::iterator t =
_timers.begin(); t !=
_timers.end(); ++t)
59 std::list<TimerID>::iterator
id = --
_timers.end();
95 SDL_RemoveTimer(
id._id);
105 if (newInterval == 0) {
static uint32 timerCallback(uint32 interval, void *data)
#define TimerMan
Shortcut for accessing the timer manager.
void removeTimer(TimerHandle &handle)
Remove that timer function.
The global timer manager.
Basic exceptions to throw.
#define DECLARE_SINGLETON(T)
Note that you need to use this macro from the global namespace.
std::list< TimerID >::iterator _iterator
Convenience class that locks a mutex on creation and unlocks it on destruction.
boost::function< uint32(uint32)> TimerFunc
A timer callback function.
std::list< TimerID > _timers
void addTimer(uint32 interval, TimerHandle &handle, const TimerFunc &func)
Add a function to be called regularly.
The global timer manager.