We should normalize the next timespec before checking if now > next, so that the tsgreater() check really works as expected. Signed-off-by: Tommi Rantala <tommi.t.rantala@xxxxxxxxx> --- src/cyclictest/cyclictest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index b4dec98..aae65ef 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -1221,6 +1221,8 @@ static void *timerthread(void *param) next.tv_sec += interval.tv_sec; next.tv_nsec += interval.tv_nsec; + tsnorm(&next); + if (par->mode == MODE_CYCLIC) { int overrun_count = timer_getoverrun(timer); if (overrun_count < 0) { -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html