Read access to the system clock with formatting. More...
Public Types | |
typedef time_t | TIME_T |
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... | |
Private Attributes | |
time_t | startTime_ |
Start time in seconds. More... | |
time_t | lastTime_ |
Time when clockTimeIncrement() was last called. More... | |
time_t | newTime_ |
Latest time from either elapsedClockTime() or clockTimeIncrement() More... | |
Static Private Attributes | |
static const char * | monthNames [] |
Names of the months. More... | |
Read access to the system clock with formatting.
|
static |
|
static |
|
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 Foam::setw().
Referenced by OBJedgeFormat::write().
|
static |
Return the current wall-clock date as a string.
Definition at line 77 of file clock.C.
References Foam::setw().
Referenced by JobInfo::end(), and argList::parse().
|
static |
Return the current wall-clock time as a string.
Definition at line 93 of file clock.C.
References Foam::setw().
Referenced by JobInfo::end(), and argList::parse().
Foam::clock::TIME_T elapsedClockTime | ( | ) | const |
Foam::clock::TIME_T clockTimeIncrement | ( | ) | const |
Returns wall-clock time from last call of clockTimeIncrement()
|
mutableprivate |
Time when clockTimeIncrement() was last called.
|
mutableprivate |
Latest time from either elapsedClockTime() or clockTimeIncrement()
|
staticprivate |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.