clock Class Reference

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

Inheritance diagram for clock:

Public Member Functions

 clock ()
 Null constructor which stores the start time. More...
 
time_t elapsedClockTime () const
 Returns wall-clock time from clock instantiation. More...
 
time_t 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 string dateTime ()
 Return the current wall-clock date/time as a string. More...
 
static string date ()
 Return the current wall-clock date as a string. More...
 
static 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 50 of file clock.H.

Constructor & Destructor Documentation

◆ clock()

clock ( )

Null constructor which stores the start time.

Definition at line 112 of file clock.C.

Member Function Documentation

◆ getTime()

time_t getTime ( )
static

Get the current clock time in seconds.

Definition at line 43 of file clock.C.

Referenced by clock::clockTime(), clock::clockTimeIncrement(), clock::date(), clock::dateTime(), clock::elapsedClockTime(), and clock::rawDate().

Here is the caller graph for this function:

◆ rawDate()

const struct tm rawDate ( )
static

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

Definition at line 49 of file clock.C.

References clock::getTime().

Here is the call graph for this function:

◆ dateTime()

Foam::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 57 of file clock.C.

References clock::getTime(), and Foam::setw().

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

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

◆ date()

Foam::string date ( )
static

Return the current wall-clock date as a string.

Definition at line 77 of file clock.C.

References clock::getTime(), and Foam::setw().

Referenced by argList::parse(), and jobInfo::write().

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

◆ clockTime()

Foam::string clockTime ( )
static

Return the current wall-clock time as a string.

Definition at line 93 of file clock.C.

References clock::getTime(), and Foam::setw().

Referenced by argList::parse(), and jobInfo::write().

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

◆ elapsedClockTime()

time_t elapsedClockTime ( ) const

Returns wall-clock time from clock instantiation.

Definition at line 122 of file clock.C.

References clock::getTime().

Here is the call graph for this function:

◆ clockTimeIncrement()

time_t clockTimeIncrement ( ) const

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

Definition at line 129 of file clock.C.

References clock::getTime().

Here is the call graph for this function:

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