31 const long Foam::cpuTime::Hz_(sysconf(_SC_CLK_TCK));
36 void Foam::cpuTime::getTime(timeType& t)
42 double Foam::cpuTime::timeDifference(
const timeType& beg,
const timeType& end)
48 (end.tms_utime + end.tms_stime)
49 - (beg.tms_utime + beg.tms_stime)
60 lastTime_ = startTime_;
61 newTime_ = startTime_;
70 return timeDifference(startTime_, newTime_);
78 return timeDifference(lastTime_, newTime_);
cpuTime()
Construct with the current clock time.
double cpuTimeIncrement() const
Return CPU time (in seconds) since last call to cpuTimeIncrement()
double elapsedCpuTime() const
Return CPU time (in seconds) from the start.