--- trunk/src/timer.c 2007/10/08 16:22:32 42 +++ trunk/src/timer.c 2007/10/08 16:22:56 44 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: timer.c,v 1.9 2007/06/15 17:02:38 debug Exp $ + * $Id: timer.c,v 1.11 2007/06/18 04:23:19 debug Exp $ * * Timer framework. This is used by emulated clocks. */ @@ -176,7 +176,10 @@ } #endif - timer_current_time = tv.tv_usec * 0.000001 + tv.tv_sec; + /* Get exponentially closer to the real time, instead of + just changing to it directly: */ + timer_current_time = ( (tv.tv_usec * 0.000001 + tv.tv_sec) + + timer_current_time ) / 2; timer_countdown_to_next_gettimeofday = timer_freq * SECONDS_BETWEEN_GETTIMEOFDAY_SYNCH;