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

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


On Fri, Jul 24, 2015 at 07:49:01PM +1200, Bryan Christianson wrote:
>    UTI_TimevalToDouble(&oldadj, &old_adjust_remaining);
> -
> -  offset_register = rounding_error - old_adjust_remaining;
> -
> +  offset_register = - (rounding_error + old_adjust_remaining);

> @@ -185,7 +161,7 @@ stop_adjust(void)
>    UTI_TimevalToDouble(&remadj, &adjustment_remaining);
>  
>    adjustment_achieved = adjustment_requested - adjustment_remaining;
> -  elapsed_plus_adjust = elapsed - adjustment_achieved;
> +  elapsed_plus_adjust = elapsed - fabs(adjustment_achieved);
>  
>    offset_register += current_freq * elapsed_plus_adjust - adjustment_remaining;

These two changes look suspicious to me. What exactly it's supposed to
do? Do the other drivers with similar code have a bug?

-- 
Miroslav Lichvar

-- 
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/