21 #ifndef G_NET_TIMER_LIST_H
22 #define G_NET_TIMER_LIST_H
45 G_EXCEPTION( NoInstance ,
"no TimerList instance" ) ;
71 unsigned int interval(
bool & infinite )
const ;
89 void collectGarbage() ;
96 typedef std::list<AbstractTimer*> List ;
97 bool m_run_on_destruction ;
100 bool m_empty_set_timeout_hint ;
101 bool m_soonest_changed ;
void add(AbstractTimer &)
Adds a timer. Used by Timer::Timer().
void update(G::DateTime::EpochTime previous_soonest)
Called when one of the list's timers has changed.
G::DateTime::EpochTime soonest() const
Returns the time of the first timer to expire, or zero if none.
TimerList()
Default constructor.
Overload discriminator class for TimerList.
A singleton which maintains a list of all Timer objects, and interfaces to the event loop on their be...
unsigned int interval(bool &infinite) const
Returns the interval to the next timer expiry.
static TimerList & instance()
Singleton access. Throws an exception if none.
void doTimeouts()
Triggers the timeout callbacks of any expired timers.
#define G_EXCEPTION(class_name, description)
define as a function rather than a type if optimising for size
A timer base class that calls a pure virtual method on expiry.