class implements a base class for timers measuring the CPU time and the wall-clock time
#include <timer.h>
Inheritance diagram for ABA_TIMER::
|
The constructor for a timer with a pointer to the global object glob.
This constructor initializes the total time of the timer with centiSeconds and the pointer to the corresponding global object glob. The timer is not running, too.
The destructor.
The timer is started with the function start(). For safety starting a running timer is an error.
Stops the timer and adds the difference between the current time and the starting time to the total time.
Is required for measuring the time difference between the time of the call and some base point (e.g., the program start).
The output operator writes the time in the format { hours:minutes:seconds.seconds/100} on an output stream.
class implements a base class for timers measuring the CPU time and the wall-clock time
Definition at line 47 of file timer.h.
The constructor for a timer with a pointer to the global object glob.
After the application of the constructor the timer is not running, i.e., to measure time it has to be started explicitly.
This constructor initializes the total time of the timer with centiSeconds and the pointer to the corresponding global object glob. The timer is not running, too.
The destructor.
The timer is started with the function start(). For safety starting a running timer is an error.
Stops the timer and adds the difference between the current time and the starting time to the total time.
Stopping a non-running timer is an error.
Stops the timer and sets the totalTime to 0.
true If the timer is running,
false otherwise.
The currently spent time in 1 _ 100-seconds. It is not necessary to stop the timer to get the correct time.
The currently spent time in seconds. It is not necessary to stop the timer to get the correct time. The result is rounded down to the next integer value.
The currently spent time in minutes. It is not necessary to stop the timer to get the correct time. The result is rounded down to the next integer value.
The currently spent time in hours. It is not necessary to stop the timer to get the correct time. The result is rounded down to the next integer value.
true If the currently spent time exceeds maxTime,
false otherwise.
Is required for measuring the time difference between the time of the call and some base point (e.g., the program start).
We measure time according to the following principle.
The pure virtual function theTime() returns the CPU time since the start of the program for the class CPUABA_TIMER or the elapsed time since some point in the past for the class ABA_COWTIMER. When the timer is started startTime_ is initialized with the a value returned by theTime() and when it is stopped the difference between theTime() and startTime_ is added to the total time.
Implemented in ABA_COWTIMER, and ABA_CPUTIMER.
The output operator writes the time in the format { hours:minutes:seconds.seconds/100} on an output stream.
After the time has been divided in hours, minutes and seconds we have to take care that an additional leading zero is output if minutes or seconds have a value less than ten.
A reference to the output stream.
A pointer to the corresponding global object.
Definition at line 176 of file timer.h.
The start time of the timer in 1 _ 100-seconds.
Definition at line 182 of file timer.h.
The total time in 1 _ 100-seconds.
Definition at line 186 of file timer.h.
true, if the timer is running.
Definition at line 190 of file timer.h.
The documentation for this class was generated from the following file: