Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

timer Class Reference

Inherited by function_timer, and method_timer.

List of all members.

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 Documentation

timer::timer io_event_loop   loop,
ntime    when = ntime::none(),
string    desc = string()
 

Constructor.

timer::~timer   [virtual]
 

Destructor.


Member Function Documentation

void timer::arm ntime    when
 

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)).

void timer::disarm  
 

virtual void timer::fire   [protected, pure virtual]
 

Invoked by the event loop when the timer fires.

Implemented in method_timer.

string timer::get_desc  
 

Returns the description of the timer, if any, that was passed to the constructor.

ntime timer::get_when  
 

Returns the time that the timer will fire (or ntime::none()) if unarmed.

bool timer::is_armed  
 

Returns true if the timer is armed.


Friends And Related Function Documentation

friend class io_event_loop [friend]
 


The documentation for this class was generated from the following file:
Generated on Fri Sep 20 20:07:30 2002 for NMSTL