Open CASCADE Technology 6.5.2
Public Member Functions | Static Public Member Functions | Protected Attributes
OSD_Chronometer Class Reference

This class measures CPU time (both user and system) consumed
by current process or thread. The chronometer can be started
and stopped multiple times, and measures cumulative time.

#include <OSD_Chronometer.hxx>

Inheritance diagram for OSD_Chronometer:
Inheritance graph
[legend]

Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
 OSD_Chronometer (const Standard_Boolean ThisThreadOnly=Standard_False)
 Initializes a stopped Chronometer.

virtual void Destroy ()
 ~OSD_Chronometer ()
virtual void Reset ()
 Stops and Reinitializes the Chronometer.

virtual void Stop ()
 Stops the Chronometer.

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

virtual void Show ()
 Shows the current CPU user and system time on the
standard output stream <cout>.
The chronometer can be running (laps Time) or stopped.

virtual void Show (Standard_OStream &os)
 Shows the current CPU user and system time on the output
stream <os>.
The chronometer can be running (laps Time) or stopped.

void Show (Standard_Real &UserSeconds)
 Returns the current CPU user time in a variable.
The chronometer can be running (laps Time) or stopped.

void Show (Standard_Real &UserSeconds, Standard_Real &SystemSeconds)
 Returns the current CPU user and system time in variables.
The chronometer can be running (laps Time) or stopped.

Static Public Member Functions

static void GetProcessCPU (Standard_Real &UserSeconds, Standard_Real &SystemSeconds)
 Returns CPU time (user and system) consumed by the current
process since its start, in seconds. The actual precision of
the measurement depends on granularity provided by the system,
and is platform-specific.

static void GetThreadCPU (Standard_Real &UserSeconds, Standard_Real &SystemSeconds)
 Returns CPU time (user and system) consumed by the current
thread since its start. Note that this measurement is
platform-specific, as threads are implemented and managed
differently on different platforms and CPUs.

Protected Attributes

Standard_Boolean Stopped

Constructor & Destructor Documentation

OSD_Chronometer::OSD_Chronometer ( const Standard_Boolean  ThisThreadOnly = Standard_False)
OSD_Chronometer::~OSD_Chronometer ( ) [inline]

Member Function Documentation

virtual void OSD_Chronometer::Destroy ( ) [virtual]
static void OSD_Chronometer::GetProcessCPU ( Standard_Real UserSeconds,
Standard_Real SystemSeconds 
) [static]
static void OSD_Chronometer::GetThreadCPU ( Standard_Real UserSeconds,
Standard_Real SystemSeconds 
) [static]
void OSD_Chronometer::operator delete ( void *  anAddress) [inline]

Reimplemented in OSD_Timer.

void* OSD_Chronometer::operator new ( size_t  size) [inline]

Reimplemented in OSD_Timer.

void* OSD_Chronometer::operator new ( size_t  ,
void *  anAddress 
) [inline]

Reimplemented in OSD_Timer.

virtual void OSD_Chronometer::Reset ( ) [virtual]

Reimplemented in OSD_Timer.

virtual void OSD_Chronometer::Show ( ) [virtual]

Reimplemented in OSD_Timer.

void OSD_Chronometer::Show ( Standard_Real UserSeconds,
Standard_Real SystemSeconds 
)
void OSD_Chronometer::Show ( Standard_Real UserSeconds)
virtual void OSD_Chronometer::Show ( Standard_OStream os) [virtual]

Reimplemented in OSD_Timer.

virtual void OSD_Chronometer::Start ( ) [virtual]

Reimplemented in OSD_Timer.

virtual void OSD_Chronometer::Stop ( ) [virtual]

Reimplemented in OSD_Timer.


Field Documentation


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