summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/tracker.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp
index 7e6919a3..c96bb9b4 100644
--- a/opentrack/tracker.cpp
+++ b/opentrack/tracker.cpp
@@ -197,10 +197,8 @@ void Tracker::run() {
libs.pTracker->data(newpose);
logic();
- double q = sleep_ms * 1000L;
- q -= t.elapsed();
- q = std::max(0., q);
- usleep((long)q);
+ long q = sleep_ms * 1000L - t.elapsed()/1000L;
+ usleep(q);
}
{