File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ void Timer::stop()
140140 mStopped = true ;
141141}
142142
143- void Timer::calculateAndOutputTimeDiff (const std::chrono::system_clock::time_point & start, const std::chrono::system_clock::time_point & end)
143+ void Timer::calculateAndOutputTimeDiff (const tp & start, const tp & end)
144144{
145145 auto diff = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
146146
Original file line number Diff line number Diff line change @@ -79,11 +79,13 @@ class CPPCHECKLIB Timer {
7979 Timer (const Timer&) = delete ;
8080 Timer& operator =(const Timer&) = delete ;
8181
82- static std::chrono::system_clock::time_point now () {
82+ using tp = std::chrono::time_point<std::chrono::high_resolution_clock>;
83+
84+ static tp now () {
8385 return std::chrono::high_resolution_clock::now ();
8486 }
8587
86- static void calculateAndOutputTimeDiff (const std::chrono::system_clock::time_point & start, const std::chrono::system_clock::time_point & end);
88+ static void calculateAndOutputTimeDiff (const tp & start, const tp & end);
8789
8890 void stop ();
8991
You can’t perform that action at this time.
0 commit comments