32inline double Foam::cpuTimeCxx::diff(
const value_type& a,
const value_type&
b)
34 return std::difftime(a.value,
b.value) / CLOCKS_PER_SEC;
40Foam::cpuTimeCxx::value_type::value_type()
55void Foam::cpuTimeCxx::value_type::update()
71 return diff(last_, start_);
77 const value_type prev(last_);
79 return diff(last_, prev);
void resetCpuTime()
Reset to use the current time for the start time.
cpuTimeCxx()
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.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.