]> git.webhop.me Git - lcd4linux.git/commitdiff
more timer fixes
authormichux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 15 Apr 2009 21:32:24 +0000 (21:32 +0000)
committermichux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 15 Apr 2009 21:32:24 +0000 (21:32 +0000)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1030 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

timer.c

diff --git a/timer.c b/timer.c
index 51a24500966877cbceabb2240890a4b8b39068d3..ed7064bc554a4980d587f01975f0d6e23a773f5b 100644 (file)
--- a/timer.c
+++ b/timer.c
@@ -179,14 +179,15 @@ int timer_process(struct timespec *delay)
     /* nanoseconds!! */
     delay->tv_nsec *= 1000;
 
-    /* check if date changed*/
-    if ((delay->tv_sec) > CLOCK_SKEW_DETECT_TIME_IN_S) { 
-            delay->tv_sec = 0; 
-            warn("Oops, clock skewed, update timestamp");
-           gettimeofday(&now, NULL);
-            Timers[min].when = now;
+    /* check if date changed */
+    if ((delay->tv_sec) > CLOCK_SKEW_DETECT_TIME_IN_S) {
+       delay->tv_sec = 0;
+       delay->tv_nsec = 0;
+       warn("Oops, clock skewed, update timestamp");
+       gettimeofday(&now, NULL);
+       Timers[min].when = now;
     }
-    
+
     return 0;
 
 }
@@ -194,7 +195,6 @@ int timer_process(struct timespec *delay)
 
 void timer_exit(void)
 {
-
     nTimers = 0;
 
     if (Timers != NULL) {