summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--logic/pipeline.cpp4
-rw-r--r--logic/pipeline.hpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp
index 81a6989b..bd7f8300 100644
--- a/logic/pipeline.cpp
+++ b/logic/pipeline.cpp
@@ -591,11 +591,11 @@ void pipeline::run()
const ns elapsed_nsecs = t.elapsed<ns>();
t.start();
- if (backlog_time > secs(3) || backlog_time < secs(-3))
+ if (std::chrono::abs(backlog_time) > secs(3))
{
qDebug() << "tracker: backlog interval overflow"
<< ms{backlog_time}.count() << "ms";
- backlog_time = ns{};
+ backlog_time = {};
}
backlog_time += ns{elapsed_nsecs - const_sleep_ms};
diff --git a/logic/pipeline.hpp b/logic/pipeline.hpp
index cdcf0b41..0cdeebfb 100644
--- a/logic/pipeline.hpp
+++ b/logic/pipeline.hpp
@@ -116,7 +116,7 @@ class OTR_LOGIC_EXPORT pipeline : private QThread, private bits
//state_ state, scaled_state;
state_ scaled_state;
- ms backlog_time {};
+ ns backlog_time {};
bool tracking_started = false;