aboutsummaryrefslogtreecommitdiffstats
path: root/timer.c
diff options
context:
space:
mode:
authormichux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-04-15 19:37:30 +0000
committermichux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-04-15 19:37:30 +0000
commit0d2efa950dcbf88c9ea181243aa4adae72261cd5 (patch)
tree743c7567d65b256a1630ea6e8f44ba6eb1e72405 /timer.c
parent67ed497fcbcc2f11e9e84f45a9151ea1b986e6e7 (diff)
downloadlcd4linux-0d2efa950dcbf88c9ea181243aa4adae72261cd5.tar.gz
make the code more sexy...
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1029 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'timer.c')
-rw-r--r--timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/timer.c b/timer.c
index f313a36..51a2450 100644
--- 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);