diff --git a/bfps/cpp/bfps_timer.hpp b/bfps/cpp/bfps_timer.hpp index bec3cb681aed06d04f789bbe6e335f59958266be..b299dc115555bd3952e22ce5984f27eb9bfb1914 100644 --- a/bfps/cpp/bfps_timer.hpp +++ b/bfps/cpp/bfps_timer.hpp @@ -53,7 +53,7 @@ class bfps_timer { public: /// Constructor - bfps_timer() { start(); } + bfps_timer() : m_cumulate(std::chrono::nanoseconds::zero()) { start(); } /// Copy constructor bfps_timer(const bfps_timer& other) = delete; @@ -68,7 +68,7 @@ public: void reset() { m_start = std::chrono::high_resolution_clock::time_point(); m_end = std::chrono::high_resolution_clock::time_point(); - m_cumulate = std::chrono::nanoseconds(); + m_cumulate = std::chrono::nanoseconds::zero(); start(); }