20 {
return Clock::now(); }
52 UTIL_THROW(
"Attempt to restart an active Timer");
64 UTIL_THROW(
"Attempt to restart an active Timer");
76 UTIL_THROW(
"Attempt to stop an inactive Timer");
80 time_ += end - begin_;
82 time_ += double(end - begin_)/double(CLOCKS_PER_SEC);
92 time_ = Duration::zero();
Timer()
Default constructor.
void stop()
Stop the clock now (internally supplied).
void start()
Start timing from now (internally computed).
void clear()
Reset accumulated time to zero.
double time() const
Return the accumulated time, in seconds.
static TimePoint now()
Return current time point.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Utility classes for scientific computation.