Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | Static Private Attributes
cpuTime Class Reference

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

Inheritance diagram for cpuTime:
Inheritance graph
[legend]

Public Member Functions

 cpuTime ()
 Construct with the current clock time. More...
 
double elapsedCpuTime () const
 Return CPU time (in seconds) from the start. More...
 
double cpuTimeIncrement () const
 Return CPU time (in seconds) since last call to cpuTimeIncrement() More...
 

Private Types

typedef struct tms timeType
 Time structure used. More...
 

Static Private Member Functions

static void getTime (timeType &)
 Retrieve the current time values from the system. More...
 
static double timeDifference (const timeType &beg, const timeType &end)
 Difference between two times. More...
 

Private Attributes

timeType startTime_
 The start time. More...
 
timeType lastTime_
 
timeType newTime_
 

Static Private Attributes

static const long Hz_
 Clock-ticks per second. More...
 

Detailed Description

Starts timing CPU usage and return elapsed time from start.

See also
clockTime
Source files

Definition at line 52 of file cpuTime.H.

Member Typedef Documentation

◆ timeType

typedef struct tms timeType
private

Time structure used.

Definition at line 57 of file cpuTime.H.

Constructor & Destructor Documentation

◆ cpuTime()

cpuTime ( )

Construct with the current clock time.

Definition at line 57 of file cpuTime.C.

Member Function Documentation

◆ getTime()

void getTime ( timeType t)
staticprivate

Retrieve the current time values from the system.

Definition at line 36 of file cpuTime.C.

◆ timeDifference()

double timeDifference ( const timeType beg,
const timeType end 
)
staticprivate

Difference between two times.

Definition at line 42 of file cpuTime.C.

◆ elapsedCpuTime()

double elapsedCpuTime ( ) const

Return CPU time (in seconds) from the start.

Definition at line 67 of file cpuTime.C.

Referenced by domainDecomposition::distributeCells(), and main().

Here is the caller graph for this function:

◆ cpuTimeIncrement()

double cpuTimeIncrement ( ) const

Return CPU time (in seconds) since last call to cpuTimeIncrement()

Definition at line 74 of file cpuTime.C.

Referenced by autoLayerDriver::addLayers(), meshRefinement::baffleAndSplitMesh(), autoSnapDriver::doSnap(), meshRefinement::handleSnapProblems(), main(), meshRefinement::mergeFreeStandingBaffles(), and writeMesh().

Here is the caller graph for this function:

Field Documentation

◆ Hz_

const long Hz_
staticprivate

Clock-ticks per second.

Definition at line 60 of file cpuTime.H.

◆ startTime_

timeType startTime_
private

The start time.

Definition at line 63 of file cpuTime.H.

◆ lastTime_

timeType lastTime_
mutableprivate

Definition at line 64 of file cpuTime.H.

◆ newTime_

timeType newTime_
mutableprivate

Definition at line 65 of file cpuTime.H.


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