Template Struct Timer

Struct Documentation

template<typename T>
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()
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
std::chrono::time_point<std::chrono::steady_clock> m_start
std::chrono::time_point<std::chrono::steady_clock> m_end