Timer Class Reference

Manages and calls TimerEvent objects. More...

#include <timer.hpp>

List of all members.

Public Member Functions

void Tick ()
 Check all contained TimeEvent objects and call any which are ready.
void Register (TimeEvent *)
 Register a TimeEvent object with the Timer object.
void Unregister (TimeEvent *)
 Unregister a TimeEvent object with the Timer object.
 ~Timer ()
 Delete any remaining autofree TimeEvent objects.

Static Public Member Functions

static double GetTime ()
 Helper function to get the current time in seconds This is not guaranteed to start at any particular number, or be a UNIX timestamp.

Static Public Attributes

static const int FOREVER = -1
 TimeEvent lifetime that will never expire.

Protected Attributes

std::list< TimeEvent * > timers
 List of TimeEvent objects a Timer controls.


Detailed Description

Manages and calls TimerEvent objects.

Constructor & Destructor Documentation

Timer::~Timer (  ) 

Delete any remaining autofree TimeEvent objects.


Member Function Documentation

double Timer::GetTime (  )  [static]

Helper function to get the current time in seconds This is not guaranteed to start at any particular number, or be a UNIX timestamp.

void Timer::Tick (  ) 

Check all contained TimeEvent objects and call any which are ready.

void Timer::Register ( TimeEvent timer  ) 

Register a TimeEvent object with the Timer object.

void Timer::Unregister ( TimeEvent timer  ) 

Unregister a TimeEvent object with the Timer object.


Member Data Documentation

std::list<TimeEvent *> Timer::timers [protected]

List of TimeEvent objects a Timer controls.

const int Timer::FOREVER = -1 [static]

TimeEvent lifetime that will never expire.


The documentation for this class was generated from the following files:

Generated on Sun Apr 5 20:28:26 2009 for EOServ by  doxygen 1.5.7.1