6.69 ABA_CPUTIMER Class Reference

This class derived from ABA_TIMER implements a timer measuring the cpu time of parts of a program.

#include <cputimer.h>

Inheritance diagram for ABA_CPUTIMER::


PIC


Public Member Functions

Private Member Functions

Static Private Attributes

6.69.1 Detailed Description

This class derived from ABA_TIMER implements a timer measuring the cpu time of parts of a program.

Definition at line 38 of file cputimer.h.

6.69.2 Constructor & Destructor Documentation

6.69.2.1 ABA_CPUTIMER::ABA_CPUTIMER (ABA_GLOBAL * glob)

After the application of the constructor the timer is not running, i.e., to measure time it has to be started explicitly.

Parameters:

glob
A pointer to a global object.

6.69.2.2 ABA_CPUTIMER::ABA_CPUTIMER (ABA_GLOBAL * glob, long centiSeconds)

This constructor initializes the total time of the timer.

The timer is not running, too.

Parameters:

glob
A pointer to a global object.
centiSeconds
The intial value of the total time in 1 _ 100 seconds.

6.69.2.3 virtual ABA_CPUTIMER::~ABA_CPUTIMER () [virtual]

The destructor.

6.69.3 Member Function Documentation

6.69.3.1 virtual long ABA_CPUTIMER::theTime () const [private, virtual]

Returns the used cpu time in 1 _ 100 seconds since the start of the program.

This function redefines the pure virtual function of the base class ABA_TIMER.

Since CLOCKS_PER_SEC can be 1000000 the standard library function clock() returns negative values after about than 35 minutes. Hence we measure the cpu time with the function times which is common on / systems, although not defined in the /-ANSI-standard.

Implements ABA_TIMER.

6.69.4 Member Data Documentation

6.69.4.1 long ABA_CPUTIMER::clk_tck_ [static, private]

Definition at line 62 of file cputimer.h.

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