FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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

#include <OpenFOAM/clock.H>


Detailed Description

Read access to the system clock with formatting.

Source files

Definition at line 51 of file clock.H.

Inheritance diagram for clock:

List of all members.

Public Member Functions

 clock ()
 Null constructor which stores the start time.
time_t  elapsedClockTime () const
 Returns wall-clock time from clock instantiation.
time_t  clockTimeIncrement () const
 Returns wall-clock time from last call of clockTimeIncrement()

Static Public Member Functions

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

Constructor & Destructor Documentation

clock (  )

Null constructor which stores the start time.

Definition at line 114 of file clock.C.


Member Function Documentation

time_t getTime (  ) [static]

Get the current clock time in seconds.

Definition at line 45 of file clock.C.

struct tm rawDate (  ) [static, read]

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

Definition at line 51 of file clock.C.

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 59 of file clock.C.

References Foam::setw().

Foam::string date (  ) [static]

Return the current wall-clock date as a string.

Definition at line 79 of file clock.C.

References Foam::setw().

Referenced by argList::argList().

Foam::string clockTime (  ) [static]

Return the current wall-clock time as a string.

Definition at line 95 of file clock.C.

References Foam::setw().

Referenced by argList::argList().

time_t elapsedClockTime (  ) const

Returns wall-clock time from clock instantiation.

Definition at line 124 of file clock.C.

time_t clockTimeIncrement (  ) const

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

Definition at line 131 of file clock.C.


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