#include <Timer.h>
Inheritance diagram for ZThread::Timer::
Public Methods | |
Timer () throw (Synchronization_Exception) | |
virtual | ~Timer () throw () |
void | addEvent (const TimerEvent &) throw (Synchronization_Exception) |
void | addEvent (unsigned long, bool periodic=false) throw (Synchronization_Exception) |
void | delEvent (const TimerEvent &) throw (Synchronization_Exception) |
virtual void | run () throw () |
Protected Types | |
typedef std::set<TimerEvent> | EventList |
Typedef. | |
Protected Attributes | |
EventList | _eventList |
Registered events. | |
Condition | _interrupt |
Used to perform the timing. | |
FastMutex | _lock |
Used to serialize access. |
Interest in a timer is manipulated using the inherited Observable methods
|
Create a new Timer object |
|
Destroy this Timer object |
|
Set a timer. This event will occur after the given amount of time expires. An appropriate TimerEvent will be constructed and submitted to the Timer based on the parameters passed to this function
|
|
Set a timer event. This event will occur after the given amount of time expires.
|
|
Remove a TimerEvent.
|
|
This method enters a loop, waiting on the condition variable that is associated with this object. This loop will executed until the Timer has been canceled. Reimplemented from ZThread::Runnable. Reimplemented in ZThread::TimerThread. |