Re: [chrony-dev] [PATCH] MacOS X - add drift removal

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


> On 11/08/2015, at 10:59 pm, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
> 
> On Thu, Aug 06, 2015 at 04:57:43AM +1200, Bryan Christianson wrote:
>>> @@ -119,7 +119,7 @@ start_adjust(void)
>>> }
>>> 
>>> UTI_DiffTimevalsToDouble(&elapsed, &T1, &T0);
>>> -  accrued_error = elapsed * current_freq;
>>> +  accrued_error = (elapsed + DRIFT_REMOVAL_INTERVAL / 2.0) * current_freq;
>>> 
>>> adjust_required = - (accrued_error + offset_register);
>> 
>> This changes the effective drift (as seen in tracking.log) from 18ppm to 6ppm but System time still hovers around -10us 
> 
> If it changes the reported drift, it doesn't work as intended :). The
> problem probably is that the the precorrection is not included in the
> offset register and when the adjustment is stopped, the register will
> be off by that value.
> 
> How about this?

This works really well :) I'm now seeing System time vary += 5 usecs with LAN connected servers. Please commit the change (or I can submit a patch if you prefer)

-- 
Bryan Christianson
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/