From 7f68fc115abebd617d495a7d1a18b4fa0158c8e2 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 15 Jun 2017 06:36:56 +0200 Subject: compat/time: don't use "long long" for milliseconds --- compat/time.hpp | 1 - logic/tracker.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/compat/time.hpp b/compat/time.hpp index c07f29cb..e65e4855 100644 --- a/compat/time.hpp +++ b/compat/time.hpp @@ -18,7 +18,6 @@ static inline constexpr auto time_cast(const u& in) using secs = duration; using secs_ = duration; using ms = duration; -using ms_ = duration; using us = duration; using us_ = duration; using ns = duration; diff --git a/logic/tracker.cpp b/logic/tracker.cpp index 81854d0d..a5d4b86f 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -388,7 +388,7 @@ void Tracker::run() { logic(); - static constexpr ns const_sleep_ms(time_cast(ms_(4))); + static constexpr ns const_sleep_ms(time_cast(ms(4))); const ns elapsed_nsecs = prog1(t.elapsed(), t.start()); if (backlog_time > secs_(3) || backlog_time < secs_(-3)) @@ -400,8 +400,8 @@ void Tracker::run() backlog_time += ns(elapsed_nsecs - const_sleep_ms); - const int sleep_time_ms = time_cast(clamp(const_sleep_ms - backlog_time, - ms_::zero(), ms_(10))).count(); + const int sleep_time_ms = time_cast(clamp(const_sleep_ms - backlog_time, + ms::zero(), ms(10))).count(); #if 0 qDebug() << "sleepy time" << sleep_time_ms -- cgit v1.2.3