]> git.webhop.me Git - lcd4linux.git/commitdiff
make the code more sexy...
authormichux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 15 Apr 2009 19:37:30 +0000 (19:37 +0000)
committermichux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 15 Apr 2009 19:37:30 +0000 (19:37 +0000)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1029 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

timer.c

diff --git a/timer.c b/timer.c
index f313a3600f676f8a42d3051458b7308a16b08dc7..51a24500966877cbceabb2240890a4b8b39068d3 100644 (file)
--- a/timer.c
+++ b/timer.c
@@ -53,6 +53,7 @@
 #include <dmalloc.h>
 #endif
 
+#define CLOCK_SKEW_DETECT_TIME_IN_S 1
 
 typedef struct TIMER {
     void (*callback) (void *data);
@@ -179,7 +180,7 @@ int timer_process(struct timespec *delay)
     delay->tv_nsec *= 1000;
 
     /* check if date changed*/
-    if ((delay->tv_sec) > 1) { 
+    if ((delay->tv_sec) > CLOCK_SKEW_DETECT_TIME_IN_S) { 
             delay->tv_sec = 0; 
             warn("Oops, clock skewed, update timestamp");
            gettimeofday(&now, NULL);