|
timeout_t | expire () |
| Process timer queue and find when next event triggers.
|
|
void | operator+= (event &timer) |
| Add a timer event to the timer queue.
|
|
void | operator-= (event &timer) |
| Remove a timer event from the timer queue.
|
|
| TimerQueue () |
| Create an empty timer queue.
|
|
virtual | ~TimerQueue () |
| Destroy queue, does not remove event objects.
|
|
void | add (OrderedObject *ordered) |
| Add an object into the ordered index.
|
|
LinkedObject * | begin (void) const |
| Return first object in list for iterators.
|
|
void | copy (const OrderedIndex &source) |
|
unsigned | count (void) const |
| Count of objects this list manages.
|
|
LinkedObject * | end (void) const |
| Return last object in list for iterators.
|
|
LinkedObject * | find (unsigned offset) const |
| Find a specific member in the ordered list.
|
|
LinkedObject * | get (void) |
| Get (pull) object off the list.
|
|
LinkedObject * | getIndexed (unsigned index) const |
| Get an indexed member from the ordered index.
|
|
LinkedObject ** | index (void) const |
| Return a pointer to the head of the list.
|
|
virtual void | lock_index (void) |
| Used to synchronize lists managed by multiple threads.
|
|
LinkedObject * | operator* () const |
| Return head object pointer.
|
|
void | operator*= (OrderedObject *object) |
| Add object to our list.
|
|
OrderedIndex & | operator= (const OrderedIndex &object) |
| Assign ordered index.
|
|
| OrderedIndex () |
| Create and initialize an empty index.
|
|
| OrderedIndex (const OrderedIndex &source) |
|
void | purge (void) |
| Purge the linked list and then set the index to empty.
|
|
void | reset (void) |
| Reset linked list to empty without purging.
|
|
virtual void | unlock_index (void) |
| Used to synchronize lists managed by multiple threads.
|
|
virtual | ~OrderedIndex () |
| Destroy index.
|
|
A timer queue for timer events.
The timer queue is used to hold a linked list of timers that must be processed together. The timer queue processes the timer event list and calls an expired function on events that have expired. The timer queue also determines the wait time until the next timer will expire. When timer events are modified, they can retrigger the queue to re-examine the list to find when the next timer will now expire.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 268 of file timers.h.