Public Member Functions | List of all members
clockTime Class Reference

Starts timing and returns elapsed time from start. Uses std::chrono::high_resolution_clock for better resolution (2uSec instead of ~20mSec) than cpuTime. More...

Public Member Functions

 clockTime ()
 
 clockTime (const clockValue &clockval)
 
void resetTime ()
 
double elapsedTime () const
 
double timeIncrement () const
 

Detailed Description

Starts timing and returns elapsed time from start. Uses std::chrono::high_resolution_clock for better resolution (2uSec instead of ~20mSec) than cpuTime.

Note
It has twice the storage requirement of a simple clockValue since it tracks both total and incremental elapsed times. Additionally, it always invokes a clock query on construction which may make it less desirable for arrays of values (for example).
See also
Foam::clockValue
Source files

Definition at line 58 of file clockTime.H.

Constructor & Destructor Documentation

◆ clockTime() [1/2]

clockTime ( )
inline

Definition at line 23 of file clockTimeI.H.

◆ clockTime() [2/2]

clockTime ( const clockValue clockval)
inline

Definition at line 30 of file clockTimeI.H.

Member Function Documentation

◆ resetTime()

void resetTime ( )
inline

Definition at line 39 of file clockTimeI.H.

◆ elapsedTime()

double elapsedTime ( ) const
inline

Definition at line 46 of file clockTimeI.H.

◆ timeIncrement()

double timeIncrement ( ) const
inline

Definition at line 53 of file clockTimeI.H.

Referenced by TDACChemistryModel< CompType, ThermoType >::solve().

Here is the caller graph for this function:

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