OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

clock Class Reference

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

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.

Detailed Description

Read access to the system clock with formatting.

Source files

Definition at line 46 of file clock.H.


Constructor & Destructor Documentation

clock (  ) 

Null constructor which stores the start time.

Definition at line 106 of file clock.C.


Member Function Documentation

time_t getTime (  )  [static]

Get the current clock time in seconds.

Definition at line 37 of file clock.C.

Referenced by clock::clockTimeIncrement().

Here is the caller graph for this function:

struct tm rawDate (  )  [static, read]

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

Definition at line 43 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 51 of file clock.C.

Referenced by OFSsurfaceFormatCore::writeHeader(), VTKsurfaceFormatCore::writeHeader(), and WRLsurfaceFormatCore::writeHeader().

Here is the caller graph for this function:

Foam::string date (  )  [static]

Return the current wall-clock date as a string.

Definition at line 71 of file clock.C.

Foam::string clockTime (  )  [static]

Return the current wall-clock time as a string.

Definition at line 87 of file clock.C.

time_t elapsedClockTime (  )  const

Returns wall-clock time from clock instantiation.

Definition at line 116 of file clock.C.

time_t clockTimeIncrement (  )  const

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

Definition at line 123 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:
Copyright © 2000-2009 OpenCFD Ltd