Public Types | Public Member Functions | Static Public Member Functions | List of all members
clockValue Class Reference

Access to high-resolution clock value with some basic operations. Used to calculate time durations, elapsed times etc. More...

Public Types

typedef std::chrono::high_resolution_clock::duration value_type
 

Public Member Functions

 clockValue ()
 
 clockValue (bool)
 
 clockValue (const value_type &value)
 
const value_typevalue () const
 
void clear ()
 
void update ()
 
long seconds () const
 
clockValue elapsed () const
 
double elapsedTime () const
 
std::string str () const
 
 operator double () const
 
clockValueoperator-= (const clockValue &rhs)
 
clockValueoperator+= (const clockValue &rhs)
 

Static Public Member Functions

static clockValue now ()
 

Detailed Description

Access to high-resolution clock value with some basic operations. Used to calculate time durations, elapsed times etc.

Source files

Definition at line 49 of file clockValue.H.

Member Typedef Documentation

◆ value_type

typedef std::chrono::high_resolution_clock::duration value_type

Definition at line 56 of file clockValue.H.

Constructor & Destructor Documentation

◆ clockValue() [1/3]

clockValue ( )
inline

Definition at line 31 of file clockValueI.H.

Referenced by clockValue::now().

Here is the caller graph for this function:

◆ clockValue() [2/3]

clockValue ( bool  )
inlineexplicit

Definition at line 37 of file clockValueI.H.

◆ clockValue() [3/3]

clockValue ( const value_type value)
inlineexplicit

Definition at line 43 of file clockValueI.H.

Member Function Documentation

◆ now()

Foam::clockValue now ( )
inlinestatic

Definition at line 23 of file clockValueI.H.

References clockValue::clockValue().

Referenced by profiling::beginTimer(), clockValue::elapsed(), and profiling::writeData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value()

const value_type& value ( ) const
inline

Definition at line 91 of file clockValue.H.

Referenced by Foam::operator+(), and Foam::operator-().

Here is the caller graph for this function:

◆ clear()

void clear ( )
inline

Definition at line 51 of file clockValueI.H.

◆ update()

void update ( )
inline

Definition at line 57 of file clockValueI.H.

◆ seconds()

long seconds ( ) const
inline

Definition at line 63 of file clockValueI.H.

◆ elapsed()

Foam::clockValue elapsed ( ) const
inline

Definition at line 69 of file clockValueI.H.

References clockValue::now().

Referenced by profiling::endTimer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ elapsedTime()

double elapsedTime ( ) const
inline

Definition at line 75 of file clockValueI.H.

◆ str()

std::string str ( ) const

Definition at line 27 of file clockValue.C.

References os(), Foam::setfill(), and Foam::setw().

Here is the call graph for this function:

◆ operator double()

operator double ( ) const
inline

Definition at line 83 of file clockValueI.H.

◆ operator-=()

Foam::clockValue & operator-= ( const clockValue rhs)
inline

Definition at line 93 of file clockValueI.H.

◆ operator+=()

Foam::clockValue & operator+= ( const clockValue rhs)
inline

Definition at line 100 of file clockValueI.H.


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