summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-05-14 20:03:49 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-05-14 20:03:49 +0200
commiteb4e6b15e62fbb60b5031110922f8fc16eb370ea (patch)
treeb11f4e7701ddbee3b5852eda1e5087fc89b77a9b /logic
parent8c2d5631df1a25fe4ba9890bd8f716eae840aa37 (diff)
logic/tracker: cast to milliseconds before getting raw count
Previously it wasn't portable.
Diffstat (limited to 'logic')
-rw-r--r--logic/tracker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 8367ee2f..48a50d80 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -416,8 +416,9 @@ void Tracker::run()
backlog_time = backlog_time.zero();
}
- const int sleep_time_ms = iround(clamp(const_sleep_ms - backlog_time,
- ns(0), ms(50)).count());
+ const int sleep_time_ms = iround(time_cast<ms>(clamp(const_sleep_ms - backlog_time,
+ ns(0), ms(50)))
+ .count());
portable::sleep(sleep_time_ms);
}