Open CASCADE Technology 6.6.0
Public Member Functions
OSD_Timer Class Reference

Working on heterogeneous platforms
we need to use the system call gettimeofday.
This function is portable and it measures ELAPSED
time and CPU time in seconds and microseconds.
Example: OSD_Timer aTimer;
aTimer.Start(); // Start the timers (t1).
..... // Do something.
aTimer.Stop(); // Stop the timers (t2).
aTimer.Show(); // Give the elapsed time between t1 and t2.
// Give also the process CPU time between
// t1 and t2.

#include <OSD_Timer.hxx>

Inheritance diagram for OSD_Timer:
Inheritance graph
[legend]

Public Member Functions

 OSD_Timer ()
 Builds a Chronometer initialized and stopped.

virtual void Reset ()
 Stops and reinitializes the timer.

virtual void Show ()
 Shows both the elapsed time and CPU time on the standard output
stream <cout>.The chronometer can be running (Lap Time) or
stopped.

virtual void Show (Standard_OStream &os)
 Shows both the elapsed time and CPU time on the
output stream <OS>.

void Show (Standard_Real &seconds, Standard_Integer &minutes, Standard_Integer &hours, Standard_Real &CPUtime)
 returns both the elapsed time(seconds,minutes,hours)
and CPU time.

virtual void Stop ()
 Stops the Timer.

virtual void Start ()
 Starts (after Create or Reset) or restarts (after Stop)
the Timer.

Standard_Real ElapsedTime ()
 Returns elapsed time in seconds.


Constructor & Destructor Documentation

OSD_Timer::OSD_Timer ( )

Member Function Documentation

Standard_Real OSD_Timer::ElapsedTime ( )
virtual void OSD_Timer::Reset ( ) [virtual]

Reimplemented from OSD_Chronometer.

virtual void OSD_Timer::Show ( ) [virtual]

Reimplemented from OSD_Chronometer.

void OSD_Timer::Show ( Standard_Real seconds,
Standard_Integer minutes,
Standard_Integer hours,
Standard_Real CPUtime 
)
virtual void OSD_Timer::Show ( Standard_OStream os) [virtual]

Reimplemented from OSD_Chronometer.

virtual void OSD_Timer::Start ( ) [virtual]

Reimplemented from OSD_Chronometer.

virtual void OSD_Timer::Stop ( ) [virtual]

Reimplemented from OSD_Chronometer.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines