cpuTimeCxx Class Reference

Starts timing CPU usage and return elapsed time from start. More...

Public Member Functions

 cpuTimeCxx ()
 Construct with the current clock time. More...
 
void resetCpuTime ()
 Reset to use the current time for the start and increment points. More...
 
void resetCpuTimeIncrement () const
 Reset to use the current time for the increment point. More...
 
double elapsedCpuTime () const
 Return CPU time (in seconds) from the start. More...
 
double cpuTimeIncrement () const
 Return CPU time [seconds] since last call to cpuTimeIncrement(), resetCpuTimeIncrement(). More...
 

Detailed Description

Starts timing CPU usage and return elapsed time from start.

See also
clockTime
Source files

Definition at line 49 of file cpuTimeCxx.H.

Constructor & Destructor Documentation

◆ cpuTimeCxx()

Construct with the current clock time.

Definition at line 39 of file cpuTimeCxx.C.

Member Function Documentation

◆ resetCpuTime()

void resetCpuTime ( )

Reset to use the current time for the start and increment points.

Definition at line 54 of file cpuTimeCxx.C.

◆ resetCpuTimeIncrement()

void resetCpuTimeIncrement ( ) const

Reset to use the current time for the increment point.

Definition at line 61 of file cpuTimeCxx.C.

◆ elapsedCpuTime()

double elapsedCpuTime ( ) const

Return CPU time (in seconds) from the start.

Definition at line 67 of file cpuTimeCxx.C.

References Foam::diff().

Here is the call graph for this function:

◆ cpuTimeIncrement()

double cpuTimeIncrement ( ) const

Return CPU time [seconds] since last call to cpuTimeIncrement(), resetCpuTimeIncrement().

Definition at line 74 of file cpuTimeCxx.C.

References Foam::diff().

Here is the call graph for this function:

The documentation for this class was generated from the following files: