MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / clock

Class clock

src/OpenFOAM/global/clock/clock.H:51–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49\*---------------------------------------------------------------------------*/
50
51class clock
52{
53 // Private data
54
55 //- Start time in seconds
56 time_t startTime_;
57
58 //- Time when clockTimeIncrement() was last called
59 mutable time_t lastTime_;
60
61 //- Latest time from either elapsedClockTime() or clockTimeIncrement()
62 mutable time_t newTime_;
63
64 //- Names of the months
65 static const char *monthNames[];
66
67
68public:
69
70 // Constructors
71
72 //- Null constructor which stores the start time
73 clock();
74
75
76 // Member Functions
77
78 //- Get the current clock time in seconds
79 static time_t getTime();
80
81 //- Return the current wall-clock date as a raw struct
82 static const struct tm rawDate();
83
84 //- Return the current wall-clock date/time as a string
85 // format according to ISO-8601 (yyyy-mm-ddThh:mm:ss)
86 static string dateTime();
87
88 //- Return the current wall-clock date as a string
89 static string date();
90
91 //- Return the current wall-clock time as a string
92 static string clockTime();
93
94 //- Returns wall-clock time from clock instantiation
95 time_t elapsedClockTime() const;
96
97 //- Returns wall-clock time from last call of clockTimeIncrement()
98 time_t clockTimeIncrement() const;
99};
100
101
102// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Callers 2

testFunction · 0.85
clock.CFile · 0.85

Calls

no outgoing calls

Tested by 1

testFunction · 0.68