35 static const long clockTicks_(sysconf(_SC_CLK_TCK));
40 inline double Foam::cpuTimePosix::diff(
const value_type& a,
const value_type&
b)
44 double((a.tms_utime + a.tms_stime) - (
b.tms_utime +
b.tms_stime))
52 Foam::cpuTimePosix::value_type::value_type()
89 return diff(last_, start_);
95 const value_type prev(last_);
97 return diff(last_, prev);
void resetCpuTimeIncrement() const
Reset to use the current time for the increment point.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
void resetCpuTime()
Reset to use the current time for the start time.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
static const long clockTicks_(sysconf(_SC_CLK_TCK))
double cpuTimeIncrement() const
Return CPU time [seconds] since last call to cpuTimeIncrement(), resetCpuTimeIncrement().
double elapsedCpuTime() const
Return CPU time [seconds] from the start.
cpuTimePosix()
Construct with the current clock time.