]> git.webhop.me Git - lcd4linux.git/commitdiff
- timer.c: do also check diff.tv_usec to trigger next update
authorsvenhoefer <svenhoefer@svenhoefer.com>
Mon, 2 May 2016 21:33:49 +0000 (23:33 +0200)
committersvenhoefer <svenhoefer@svenhoefer.com>
Mon, 2 May 2016 21:33:49 +0000 (23:33 +0200)
timer.c

diff --git a/timer.c b/timer.c
index 1009f56f071191e0db7d9751357716ede671184b..e4e1a4714b1fb6d7bfe8a3c22f8413579cf960ee 100644 (file)
--- a/timer.c
+++ b/timer.c
@@ -435,7 +435,7 @@ int timer_process(struct timespec *delay)
     /* a negative delay has occurred (positive clock skew or some
        timers are faster than the time needed for processing their
        callbacks) */
-    if (diff.tv_sec < 0) {
+    if (diff.tv_sec < 0 || diff.tv_usec < 0) {
        /* zero "diff" so the next update is triggered immediately */
        timerclear(&diff);
     } else {