Commit 07b1c356 authored by Claes Sjofors's avatar Claes Sjofors

rt_trend, changed to monotonic time to avoid delay at time shifts

parent 324255ed
......@@ -167,7 +167,7 @@ int main (int argc, char **argv)
/* If even sts, just wait for init message */
time_GetTime(&LastScan);
time_GetTimeMonotonic(&LastScan);
ScanDeltaTime.tv_sec = ScanTime;
ScanDeltaTime.tv_nsec = 0;
......@@ -176,7 +176,7 @@ int main (int argc, char **argv)
for (;;) {
time_GetTime(&CurrentTime);
time_GetTimeMonotonic(&CurrentTime);
time_Aadd(&NextScan, &LastScan, &ScanDeltaTime);
if (time_Acomp(&CurrentTime, &NextScan) < 0) {
time_Adiff(&WaitTime, &NextScan, &CurrentTime);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment