Re: [chrony-dev] [PATCH] MacOS X - add drift removal |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH] MacOS X - add drift removal
- From: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Date: Wed, 12 Aug 2015 08:00:06 +1200
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a0-2; h=Feedback-ID:X-Smtpcorp-Track:To:Message-Id:Date: From:Subject; bh=A6BsOirKSsjRCAQ+hsD2iRabC78bSbynBtNBZptV9sQ=; b=FTEal//kAQhk /PWqbrqyqLtX52paPgsit6KjSDZKqDrqo/Mg31MvCquLwH5v0oCYwmXblyN1vbZ/qy85XLCfzPoCm CA3JA36fNY2MdBjs7806LlE7Mc9Dd/jk4ASK0XOuXUTRvM8xMcFFvyr334z2IWbhhugqIKdRiQwKa D4xT2cJkxh/9qb7Ypgr7OZnp1Ix1/uiYrrs00JyfLwvip5hC/FrBHRq7CMNPNfeo713TkNz+8CrQZ RJa0N2l8LkQnKikNLkMTiy0P6RmteDabYmO8yl3r14Z31mZM+70lLKgRgs8IwjdzPWJu8FjdWupbs bWVCduYCqxjedj+4K74aRg==;
- Feedback-id: 149811m:149811acx33YQ:149811ssmceaFbnH:SMTPCORP
> 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.