12.1 Timer Class

The Timer Class is used to keep track of run times in the CÆSAR Code Package. A Timer keeps track of both CPU and Wall Clock times. The time between starting and stopping a Timer is referred to as a split time. A Timer keeps statistics for split and total times, and for each processor in a parallel run.

Timer public procedures:

 Fundamental procedures  
 Initialize  Initializes a Timer object.
 Finalize  Finalizes a Timer object.
 Valid_State  Returns false iff a Timer object is in an invalid state.
 Operations  
 Arithmetic_Mean  Returns the arithmetic mean of the Timer object.
 Average  Returns the arithmetic mean of the Timer object.
 Count  Returns the number of splits in the Timer object.
 Geometric_Mean  Returns the geometric mean of the Timer object.
 Get_CPU_Time  Returns CPU time in seconds.
 Get_Wall_Clock_Time  Returns Wall Clock time in seconds.
 Harmonic_Mean  Returns the harmonic mean of the Timer object.
 Initialized  Returns true iff a Timer object has been initialized.
 Maximum  Returns the maximum value of the Timer object.
 Mean  Returns the arithmetic mean of the Timer object.
 Minimum  Returns the minimum value of the Timer object.
 Julian_Day  Returns the Julian Day number for a given date.
 Name  Returns the name of the Timer object.
 Output  Writes out the Timer object.
 Reset  Resets all the registers in a Timer object, returning it to a freshly initialized state.
 Standard_Deviation  Returns the standard deviation of the Timer object.
 Start  Instructs a Timer object to begin timing.
 Stop  Instructs a Timer object to discontinue timing.
 Sum  Returns the sum or total of the Timer object.
 Total  Returns the sum or total of the Timer object.
 Totally_Positive  Returns true if all the times in the Timer object are positive.

Timer public defined types:

 Timer type  
 CPU_Time  Time object to track.
 Initialized  Initialization status.
 Name  The name for this Timer object.
 Running  Logical for Timer state.
 Wall_Clock_Time  Time object to track.
 Time type  
 Start  Initial time value.
 Statistics  Statistics for the time splits.

The Timer Class code listing contains additional documentation. The Timer Class also contains a Unit Test Program.



Subsections
Michael L. Hall