21 #ifndef stopwatch_hh__
22 #define stopwatch_hh__
111 typedef std::chrono::steady_clock
clock;
std::ostream & operator<<(std::ostream &, const Stopwatch &)
Print human-readable representation of the time elapsed.
Definition: Stopwatch.cc:72
The Stopwach class provides a simple interace to allow timing function calls etc.....
Definition: Stopwatch.hh:107
long useconds() const
Number of micro-seconds elapsed (needs to be added to 'seconds').
Definition: Stopwatch.cc:66
long elapsed_
Definition: Stopwatch.hh:132
std::chrono::steady_clock clock
Definition: Stopwatch.hh:111
void reset()
Reset to no-time-elapsed.
Definition: Stopwatch.cc:29
bool stopped() const
Is the stopwatch currently timing?
Definition: Stopwatch.cc:47
friend std::ostream & operator<<(std::ostream &, const Stopwatch &)
Print human-readable representation of the time elapsed.
Definition: Stopwatch.cc:72
Stopwatch()
Definition: Stopwatch.cc:24
void checkpoint_() const
Definition: Stopwatch.cc:52
void start()
Continue timing (does not reset).
Definition: Stopwatch.cc:35
bool stopped_
Definition: Stopwatch.hh:133
clock::time_point start_
Definition: Stopwatch.hh:131
void stop()
Stop timing.
Definition: Stopwatch.cc:41
long seconds() const
Number of seconds elapsed.
Definition: Stopwatch.cc:60
static const long s_to_us
Definition: Stopwatch.hh:135