5 #ifndef COAL_TIMINGS_FWD_H
6 #define COAL_TIMINGS_FWD_H
10 #ifdef COAL_WITH_CXX11_SUPPORT
32 #ifdef COAL_WITH_CXX11_SUPPORT
41 Timer(
const bool start_on_construction =
true) : m_is_stopped(true) {
46 if (m_is_stopped)
return m_times;
49 #ifdef COAL_WITH_CXX11_SUPPORT
50 std::chrono::time_point<std::chrono::steady_clock> current_clock =
51 std::chrono::steady_clock::now();
52 current.
user +=
static_cast<double>(
53 std::chrono::duration_cast<std::chrono::nanoseconds>(
54 current_clock - m_start)
61 #ifdef COAL_WITH_CXX11_SUPPORT
70 #ifdef COAL_WITH_CXX11_SUPPORT
71 m_start = std::chrono::steady_clock::now();
77 if (m_is_stopped)
return;
80 #ifdef COAL_WITH_CXX11_SUPPORT
81 m_end = std::chrono::steady_clock::now();
82 m_times.user +=
static_cast<double>(
83 std::chrono::duration_cast<std::chrono::nanoseconds>(
91 #ifdef COAL_WITH_CXX11_SUPPORT
93 m_start = std::chrono::steady_clock::now();
105 #ifdef COAL_WITH_CXX11_SUPPORT
106 std::chrono::time_point<std::chrono::steady_clock> m_start, m_end;
112 #endif // ifndef COAL_TIMINGS_FWD_H