12. Timers

Timers may be implemented in C++ or OTcl. In C++, timers are based on an abstract base class defined in ~ns/timer-handler.h. They are most often used in agents, but the framework is general enough to be used by other objects. The discussion below is oriented towards the use of timers in agents.

The procedures and functions described in this chapter can be found in ~ns/tcl/ex/timer.tcl, and ~ns/timer-handler.{cc, h}.

In OTcl, a simple timer class is defined in ~ns/tcl/ex/timer.tcl. Subclasses can be derived to provide a simple mechanism for scheduling events at the OTcl level.



Subsections

Tom Henderson 2014-12-17