clock Class Reference

Read access to the system clock with formatting. More...

Inheritance diagram for clock:
[legend]

Public Member Functions

 clock ()
 Construct null, storing the start time. More...
 
double elapsedClockTime () const
 Returns wall-clock time from clock instantiation. More...
 
double clockTimeIncrement () const
 Returns wall-clock time from last call of clockTimeIncrement() More...
 

Static Public Member Functions

static time_t getTime ()
 Get the current clock time in seconds. More...
 
static const struct tm rawDate ()
 Return the current wall-clock date as a raw struct. More...
 
static std::string dateTime ()
 Return the current wall-clock date/time as a string. More...
 
static std::string date ()
 Return the current wall-clock date as a string. More...
 
static std::string clockTime ()
 Return the current wall-clock time as a string. More...
 

Detailed Description

Read access to the system clock with formatting.

Source files

Definition at line 52 of file clock.H.

Constructor & Destructor Documentation

◆ clock()

clock ( )

Construct null, storing the start time.

Definition at line 113 of file clock.C.

Member Function Documentation

◆ getTime()

time_t getTime ( )
static

Get the current clock time in seconds.

Definition at line 46 of file clock.C.

◆ rawDate()

const struct tm rawDate ( )
static

Return the current wall-clock date as a raw struct.

Definition at line 52 of file clock.C.

◆ dateTime()

std::string dateTime ( )
static

Return the current wall-clock date/time as a string.

format according to ISO-8601 (yyyy-mm-ddThh:mm:ss)

Definition at line 60 of file clock.C.

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

Referenced by profilingSysInfo::write(), OBJedgeFormat::write(), STARCDsurfaceFormatCore::writeCase(), and STARCDedgeFormat::writeCase().

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

◆ date()

std::string date ( )
static

Return the current wall-clock date as a string.

Definition at line 80 of file clock.C.

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

Referenced by argList::parse().

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

◆ clockTime()

std::string clockTime ( )
static

Return the current wall-clock time as a string.

Definition at line 95 of file clock.C.

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

Referenced by argList::parse().

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

◆ elapsedClockTime()

double elapsedClockTime ( ) const

Returns wall-clock time from clock instantiation.

Definition at line 122 of file clock.C.

Referenced by adjointMeshMovementSolver::solve(), and adjointEikonalSolver::solve().

Here is the caller graph for this function:

◆ clockTimeIncrement()

double clockTimeIncrement ( ) const

Returns wall-clock time from last call of clockTimeIncrement()

Definition at line 129 of file clock.C.


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