diff options
author | michux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2009-04-15 21:32:24 +0000 |
---|---|---|
committer | michux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2009-04-15 21:32:24 +0000 |
commit | 2fc3bb1ea3f4530ede6fdd2fda10848cc2c4d9d7 (patch) | |
tree | 8f3484f3bbe06d9c18dca02194e13676dace1b93 | |
parent | 0d2efa950dcbf88c9ea181243aa4adae72261cd5 (diff) | |
download | lcd4linux-2fc3bb1ea3f4530ede6fdd2fda10848cc2c4d9d7.tar.gz |
more timer fixes
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1030 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r-- | timer.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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) { |