1 #ifndef PROFILER_SRC_MOLPRO_PROFILER_TREE_TIMER_H
2 #define PROFILER_SRC_MOLPRO_PROFILER_TREE_TIMER_H
60 bool stopped()
const {
return m_stopped; };
62 bool dummy()
const {
return m_dummy; };
72 double m_cumulative = 0;
73 bool m_stopped =
true;
Measures cpu or wall time. Can be constructed as a dummy that is always stopped.
Definition: Timer.h:40
double stop_time() const
Definition: Timer.h:56
double cumulative_time() const
Cumulative time over all start/stop periods. If active than it includes the time from start to curren...
Definition: Timer.cpp:42
Timer & start()
start timing
Definition: Timer.cpp:20
void operator+=(const Timer &other)
updates cumulative time
Definition: Timer.cpp:51
void reset()
Reset the timer erasing all data.
Definition: Timer.cpp:53
Timer(Type type, bool is_dummy)
Definition: Timer.cpp:15
bool stopped() const
Timer is stopped and is not timing.
Definition: Timer.h:60
Type type() const
type of timer
Definition: Timer.h:66
Timer & stop()
Stops timing, storing time since creation in cumulative.
Definition: Timer.cpp:33
bool dummy() const
Timer is dummy and does nothing.
Definition: Timer.h:62
double start_time() const
Definition: Timer.h:55
Type
Definition: Timer.h:42
@ cpu
Definition: Timer.h:42
@ wall
Definition: Timer.h:42