fix timestamp loop issue

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1027 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
This commit is contained in:
michux
2009-04-15 19:28:30 +00:00
parent 1701413855
commit 6454194b7c
+8
View File
@@ -178,6 +178,14 @@ int timer_process(struct timespec *delay)
/* nanoseconds!! */
delay->tv_nsec *= 1000;
/* check if date changed*/
if ((delay->tv_sec) > 1) {
delay->tv_sec = 0;
warn("Oops, clock skewed, update timestamp");
gettimeofday(&now, NULL);
Timers[min].when = now;
}
return 0;
}