From: Miroslav Lichvar Date: Fri, 24 Feb 2012 15:26:53 +0000 (+0100) Subject: Reschedule fast slew timeout on offset change X-Git-Tag: 1.27-pre1~7 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4ce3f19c35251f3572ed11523f81cdc4dae51d1;p=thirdparty%2Fchrony.git Reschedule fast slew timeout on offset change --- diff --git a/sys_linux.c b/sys_linux.c index 02cee9d4..4290e58a 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -419,7 +419,8 @@ stop_fast_slew(void) } /* ================================================== */ -/* This routine reschedules fast slew timeout after frequency was changed */ +/* This routine reschedules fast slew timeout according + to the current frequency and offset */ static void adjust_fast_slew(double old_tick, double old_delta_tick) @@ -646,9 +647,9 @@ accrue_offset(double offset, double corr_rate) if (!fast_slewing) { initiate_slew(); - } /* Otherwise, when the fast slew completes, any other stuff - in the offset register will be applied */ - + } else { + adjust_fast_slew(current_total_tick, delta_total_tick); + } } /* ================================================== */