19 #ifndef _PLAYER_TIMER_H_
20 #define _PLAYER_TIMER_H_
29 void startOneShot(
double interval);
31 bool isActive()
const;
34 virtual void fired() = 0;
41 template <
typename TimerFiredClass>
44 typedef void (TimerFiredClass::*TimerFiredFunction)();
46 Timer(TimerFiredClass* o, TimerFiredFunction f)
47 : m_object(o), m_function(f) { }
50 virtual void fired() { (m_object->*m_function)(); }
52 TimerFiredClass* m_object;
53 TimerFiredFunction m_function;
56 #endif // _PLAYER_TIMER_H_