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

Starts timing (using rtc) and returns elapsed time from start. Better resolution (2uSec instead of ~20mSec) than cpuTime. More...

Public Member Functions

 clockTime ()
 Construct with the current clock time. More...
 
double elapsedTime () const
 Return time (in seconds) from the start. More...
 
double timeIncrement () const
 Return time (in seconds) since last call to timeIncrement() More...
 

Private Types

typedef struct timeval 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_
 
timeType lastTime_
 
timeType newTime_
 

Detailed Description

Starts timing (using rtc) and returns elapsed time from start. Better resolution (2uSec instead of ~20mSec) than cpuTime.

Source files

Definition at line 53 of file clockTime.H.

Member Typedef Documentation

◆ timeType

typedef struct timeval timeType
private

Time structure used.

Definition at line 58 of file clockTime.H.

Constructor & Destructor Documentation

◆ clockTime()

clockTime ( )

Construct with the current clock time.

Definition at line 45 of file clockTime.C.

Member Function Documentation

◆ getTime()

void getTime ( timeType t)
staticprivate

Retrieve the current time values from the system.

Definition at line 31 of file clockTime.C.

◆ timeDifference()

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

Difference between two times.

Definition at line 37 of file clockTime.C.

References Foam::e.

◆ elapsedTime()

double elapsedTime ( ) const

Return time (in seconds) from the start.

Definition at line 55 of file clockTime.C.

◆ timeIncrement()

double timeIncrement ( ) const

Return time (in seconds) since last call to timeIncrement()

Definition at line 62 of file clockTime.C.

Field Documentation

◆ startTime_

timeType startTime_
private

Definition at line 60 of file clockTime.H.

◆ lastTime_

timeType lastTime_
mutableprivate

Definition at line 62 of file clockTime.H.

◆ newTime_

timeType newTime_
mutableprivate

Definition at line 63 of file clockTime.H.


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