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
void checkpoint_() const
Definition: Stopwatch.cc:52
static const long s_to_us
Definition: Stopwatch.hh:135
long seconds() const
Number of seconds elapsed.
Definition: Stopwatch.cc:60
friend std::ostream & operator<<(std::ostream &, const Stopwatch &)
Print human-readable representation of the time elapsed.
Definition: Stopwatch.cc:72
void reset()
Reset to no-time-elapsed.
Definition: Stopwatch.cc:29
bool stopped_
Definition: Stopwatch.hh:133
std::chrono::steady_clock clock
Definition: Stopwatch.hh:111
long elapsed_
Definition: Stopwatch.hh:132
bool stopped() const
Is the stopwatch currently timing?
Definition: Stopwatch.cc:47
long useconds() const
Number of micro-seconds elapsed (needs to be added to 'seconds').
Definition: Stopwatch.cc:66
void stop()
Stop timing.
Definition: Stopwatch.cc:41
void start()
Continue timing (does not reset).
Definition: Stopwatch.cc:35
Stopwatch()
Definition: Stopwatch.cc:24
clock::time_point start_
Definition: Stopwatch.hh:131