#include <Timer.h>
Inheritance diagram for Timer:

Public Methods | |
| Timer (bool reuseKeys=true) throw (Synchronization_Exception) | |
| virtual | ~Timer () throw () |
| unsigned long | addEvent (unsigned long, bool periodic=false) throw (Synchronization_Exception) |
| bool | delEvent (unsigned long) throw (Synchronization_Exception) |
| virtual void | run () throw () |
Static Public Methods | |
| unsigned long | now () throw () |
Protected Types | |
| typedef RecursiveInstanceLock | LockPolicy |
| Locking policy. | |
| typedef std::set< TimerEvent > | EventList |
| Event list. | |
| typedef std::deque< int > | KeyList |
| ID list. | |
Protected Attributes | |
| EventList | _events |
| Registered events. | |
| KeyList | _keys |
| Used ids. | |
| unsigned long | _next |
| Next id. | |
| bool | _reuseKeys |
| Key reuse flag. | |
| Condition | _interrupt |
| Condition. | |
Interest in a timer is manipulated using the inherited Observable methods
|
|
Create a new Timer object.
|
|
|
Destroy this Timer object |
|
||||||||||||
|
Set a timer. An event will occur after the given amount of time expires. This method will create a new TimerEvent with a unique id which will be submitted to the Timer's event list.
|
|
|
Delete a TimerEvent. If an event exists in this Timer's event list (the event has not expired) with the given id then it will be removed from that list.
|
|
|
Get the curent time in milliseconds relative to the time the library was loaded.
|
|
|
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. Implements Runnable. Reimplemented in TimerThread. |
1.2.15