Public Methods | |
| timer (io_event_loop &loop, ntime when=ntime::none(), string desc=string()) | |
| Constructor. More... | |
| virtual | ~timer () |
| Destructor. More... | |
| void | arm (ntime when) |
| Arms the timer for a particular point in time. More... | |
| void | disarm () |
| bool | is_armed () |
| Returns true if the timer is armed. More... | |
| ntime | get_when () |
| Returns the time that the timer will fire (or ntime::none()) if unarmed. More... | |
| string | get_desc () |
| Returns the description of the timer, if any, that was passed to the constructor. More... | |
Protected Methods | |
| virtual void | fire ()=0 |
| Invoked by the event loop when the timer fires. More... | |
Friends | |
| class | io_event_loop |
|
||||||||||||||||
|
Constructor.
|
|
|
Destructor.
|
|
|
Arms the timer for a particular point in time. To disarm the timer, use arm(ntime::none()). To arm the timer for 1 millisecond in the future, use arm(ntime::now() + ntime::msec(1)). |
|
|
|
|
|
Invoked by the event loop when the timer fires.
Implemented in method_timer. |
|
|
Returns the description of the timer, if any, that was passed to the constructor.
|
|
|
Returns the time that the timer will fire (or ntime::none()) if unarmed.
|
|
|
Returns true if the timer is armed.
|
|
|
|