Tools.h++ Class Reference

Table Of Contents
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
RWTimer
Synopsis
Description
Persistence
Example
Public Constructor
Public Member Functions
Synopsis
#include <rw/timer.h>
RWTimer timer;
Description
This class can measure elapsed CPU (user) time. The timer has two states: running and stopped.
The timer measures the total amount of time spent in the "running" state since it was either
constructed or reset.
The timer is put into the "running" state by calling member function start(). It is put into the
"stopped" state by calling stop().
RWTimer uses the system-dpendent function clock() which returns the number of "ticks" since
it was first called. As a result, RWTimer will not be able to measure intervals longer than some
system-dependent value. (For instance, on several common UNIX systems, this value is just
under 36 minutes.)
Persistence
None