64 const std::string& name_);
105 trace(
"TimerQueue::TimerQueue");
An abstract interface for handling I/O events, timers, and such.
An abstraction to message logging facility.
#define trace(s)
trace() is used to trace function call chain in C++ program.
Priority Queue class that allows removal of arbitrariy element from the queue.
Timer class represents tuple that is stored in TimerQueue.
PriorityQueue< Timer *, TimerCompare > m_queue
Timer queue itself.
int expire(const TimeVal &tv_)
Traverse the queue, triggering all timers that are past argument timeval.
void dump(void)
Dump Queue information to the log file.
int remove(EventHandler *eh_)
Cancel all timers for the EventHandler eh_.
bool isEmpty()
Is queue empty?
TimerId insert(EventHandler *eh_, const TimeVal &tv_, const TimeVal &delta_, const std::string &name_)
Add timer (EventHandler object) to the queue to be dispatch at the time specified.
TimeVal & top(void)
Return expiration time of the top element in the queue.
unsigned long TimerId
Timer Id is used in handle_timeout() calls.