Struct Timer

Struct Documentation

struct Timer

This class mimics the way “boost/timer/timer.hpp” operates while using the modern std::chrono library. Importantly, this class will only have an effect for C++11 and more.

Public Functions

inline Timer(const bool start_on_construction = true)

Default constructor for the timer.

Parameters:

start_on_construction[in] if true, the timer will be run just after the object is created

inline CPUTimes elapsed() const
inline void start()
inline void stop()
inline void resume()
inline bool is_stopped() const

Protected Attributes

CPUTimes m_times
bool m_is_stopped