41 clock_t end = clock();
42 retval = (
static_cast<float>(end -
m_start)) / CLOCKS_PER_SEC;
73 return static_cast<float>((cpuTime / wallTime));
78 std::stringstream buffer;
80 << std::setprecision(2) << this->
CPUfraction(
false);
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
double obj
the value of the quadratic function
CPUTimer : Timer that uses the CPU time, rather than wall-clock time to measure execution time.
void reset()
Explicitly reset the timer.
std::string str()
Convert the elapsed time (without reseting) to a string.
float CPUfraction(bool doReset=true)
Return the fraction of the CPU used (CPUTime/wall-clock time).
float elapsedCPU(bool doReset=true)
Calculate the elapsed CPU time, reseting the timer if specified.
float elapsedWallClock(bool doReset=true)
Calculate the elapsed wall-clock time, reseting the timer if specified.
Timer m_wallClockTime
The regular (wall-clock time).
clock_t m_start
The starting time (implementation dependent format)
float elapsed_no_reset() const
Returns the wall-clock time elapsed in seconds since the Timer object's creation, or the last call to...
float elapsed(bool reset=true)
Returns the wall-clock time elapsed in seconds since the Timer object's creation, or the last call to...
void reset()
Explicitly reset the timer.
MANTID_KERNEL_DLL std::ostream & operator<<(std::ostream &, CPUTimer &)
Convenience function to provide for easier debug printing.