From 32b2e158a5a12d93bdb129daeb6f29466779bc62 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Tue, 16 May 2017 08:16:21 -0400 Subject: [PATCH] Changed to steady clock for timer --- include/CLI/Timer.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/CLI/Timer.hpp b/include/CLI/Timer.hpp index 9c8b8f0d..d251baf3 100644 --- a/include/CLI/Timer.hpp +++ b/include/CLI/Timer.hpp @@ -13,7 +13,7 @@ namespace CLI { class Timer { protected: /// This is a typedef to make clocks easier to use - typedef std::chrono::high_resolution_clock clock; + typedef std::chrono::steady_clock clock; /// This typedef is for points in time typedef std::chrono::time_point time_point; @@ -69,8 +69,8 @@ public: start_ = start; return out; } - /// This formats the numerical value for the time string + /// This formats the numerical value for the time string std::string make_time_str() const { time_point stop = clock::now(); std::chrono::duration elapsed = stop - start_; @@ -102,7 +102,7 @@ public: return time_print_(title_, make_time_str()); } - /// Division sets the number of cycles + /// Division sets the number of cycles to divide by (no graphical change) Timer& operator / (size_t val) {cycles = val; return *this;} };