From 052df00f03af63f5ed766e7bcecb5fbff9a387b0 Mon Sep 17 00:00:00 2001 From: Berenger Bramas <bbramas@mpcdf.mpg.de> Date: Tue, 2 May 2017 14:21:05 +0200 Subject: [PATCH] Update bfps timer -- std default duration constructor is not setting cumulated time to zero, so do it manually --- bfps/cpp/bfps_timer.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bfps/cpp/bfps_timer.hpp b/bfps/cpp/bfps_timer.hpp index bec3cb68..b299dc11 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(); } -- GitLab