If we call update_wall_time_one_tick(), with a mode of ADJ_OFFSET_SINGLESHOT,
the offset can be up to +/-512000 usec.
However, in update_wall_time_one_tick(), the offset adjustment each tick is
limited to the range of -tickadj < x < tickadj. On many current systems,
tickadj is 1. Thus, a large adjustment takes a *long* time.
While we are doing this offset change, if someone else requests another offset,
it will totally overwrite any unapplied portion of the offset from the previous
call:
/* Changes by adjtime() do not take effect till next tick. */
if (time_next_adjust != 0) {
time_adjust = time_next_adjust;
time_next_adjust = 0;
}
Thus, doing an offset of +512000, immediately followed by an offset of -512000,
will leave you with a significant negative offset.
Is this the desired behaviour?
Chris
Friesen, Christopher [CAR:VC21:EXCH] wrote:
> Thus, doing an offset of +512000, immediately followed by an offset of
> -512000, will leave you with a significant negative offset.
>
> Is this the desired behaviour?
Just realized this was the old adjtime() behaviour. Wasn't clear from the
adjtimex() man page.
Chris