ABA_CPUTIMER Class Reference

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

#include <cputimer.h>

Inheritance diagram for ABA_CPUTIMER:

ABA_TIMER ABA_ABACUSROOT List of all members.

Public Member Functions

 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.
 ABA_CPUTIMER (ABA_GLOBAL *glob, long centiSeconds)
virtual ~ABA_CPUTIMER ()
 The destructor.

Private Member Functions

virtual long theTime () const

Static Private Attributes

static long clk_tck_

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.


Constructor & Destructor Documentation

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.

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\over 100$ seconds.

virtual ABA_CPUTIMER::~ABA_CPUTIMER (  )  [virtual]

The destructor.


Member Function Documentation

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

Returns the used cpu time in $1\over100$ 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.


Member Data Documentation

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:
Generated on Tue Aug 14 18:09:56 2007 for ABACUS by  doxygen 1.5.1