UanTimer Class Reference

Generalized abstract timer class. More...

#include <uan-tools.h>

Inheritance diagram for UanTimer:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 UanTimer (void *obj)
 Constructor. Associates this timer with object obj.
virtual void start (double time)
 Start timer. Precondition that timer is not currently running.
virtual void restart (double time)
 Stops timer if running then calls start.
virtual void stop (void)
 Stops timer. Precodition, timer is running.
virtual void handle (Event *e)=0
 Function called when timer expires.
bool isBusy (void)
 Returns true if busy.
double expire (void)
 Returns seconds until timer expires.

Protected Attributes

void * object
 Object which should contain the handler function for derived classes.
bool busy
 Flag indicating whether timer is currently running.
double stime
 Global time in seconds at which timer started.
double rtime
 Timer run time in seconds.
Event intr
 Event that is referenced by scheduler.

Detailed Description

Generalized abstract timer class.

This is a generic timer class that uses the NS 2 scheduler to schedule itself. The constructor requires object which will contain the handler function in derived classes.


The documentation for this class was generated from the following files:
Generated on Mon Oct 1 12:12:53 2007 for UANModule by  doxygen 1.5.1