Commit 32b2e158a5a12d93bdb129daeb6f29466779bc62

Authored by Henry Fredrick Schreiner
1 parent 29e0b5c0

Changed to steady clock for timer

Showing 1 changed file with 3 additions and 3 deletions
include/CLI/Timer.hpp
... ... @@ -13,7 +13,7 @@ namespace CLI {
13 13 class Timer {
14 14 protected:
15 15 /// This is a typedef to make clocks easier to use
16   - typedef std::chrono::high_resolution_clock clock;
  16 + typedef std::chrono::steady_clock clock;
17 17  
18 18 /// This typedef is for points in time
19 19 typedef std::chrono::time_point<clock> time_point;
... ... @@ -69,8 +69,8 @@ public:
69 69 start_ = start;
70 70 return out;
71 71 }
72   - /// This formats the numerical value for the time string
73 72  
  73 + /// This formats the numerical value for the time string
74 74 std::string make_time_str() const {
75 75 time_point stop = clock::now();
76 76 std::chrono::duration<double> elapsed = stop - start_;
... ... @@ -102,7 +102,7 @@ public:
102 102 return time_print_(title_, make_time_str());
103 103 }
104 104  
105   - /// Division sets the number of cycles
  105 + /// Division sets the number of cycles to divide by (no graphical change)
106 106 Timer& operator / (size_t val) {cycles = val; return *this;}
107 107 };
108 108  
... ...