Prevent server from stalling if time goes backwards (M. Vallevand)
This commit is contained in:
@@ -62,6 +62,7 @@ v.0.5dev (ongoing development)
|
|||||||
+ new driver irtrans (Phant0m / Aron Parsons)
|
+ new driver irtrans (Phant0m / Aron Parsons)
|
||||||
+ serialVFD driver: support Siemens/Wincor Nixdorf BA63/66 (Stefan Herdler)
|
+ serialVFD driver: support Siemens/Wincor Nixdorf BA63/66 (Stefan Herdler)
|
||||||
+ new client lcdident.pl (Ethan Dicks)
|
+ new client lcdident.pl (Ethan Dicks)
|
||||||
|
* server: prevent stalling if time goes backwards (M. Vallevand)
|
||||||
|
|
||||||
v.0.5.2
|
v.0.5.2
|
||||||
* fix switching on/off the Load screen in lcdproc client using the menu
|
* fix switching on/off the Load screen in lcdproc client using the menu
|
||||||
|
|||||||
+1
-1
@@ -810,7 +810,7 @@ do_mainloop(void)
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
gettimeofday(&t, NULL);
|
gettimeofday(&t, NULL);
|
||||||
t_diff = t.tv_sec - last_t.tv_sec;
|
t_diff = t.tv_sec - last_t.tv_sec;
|
||||||
if ((t_diff + 1) > (LONG_MAX / 1e6)) {
|
if ( ((t_diff + 1) > (LONG_MAX / 1e6)) || (t_diff < 0) ) {
|
||||||
/* We're going to overflow the calculation - probably been to sleep, fudge the values */
|
/* We're going to overflow the calculation - probably been to sleep, fudge the values */
|
||||||
t_diff = 0;
|
t_diff = 0;
|
||||||
process_lag = 1;
|
process_lag = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user