40inline 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))
52Foam::cpuTimePosix::value_type::value_type()
67void Foam::cpuTimePosix::value_type::update()
83 return diff(last_, start_);
89 const value_type prev(last_);
91 return diff(last_, prev);
void resetCpuTime()
Reset to use the current time for the start time.
cpuTimePosix()
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.
static const long clockTicks_(sysconf(_SC_CLK_TCK))
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.