lkml.org 
[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROBLEM: Linux updates RTC secretly when clock synchronizes
On Thu, Nov 01, 2001 at 12:52:19AM +0000, Riley Williams wrote:
>
> > Note that hwclock does not adjust the clock if the error is smaller
> > than 1 second, or it already wrote to the RTC is the past 23 hours.
>
> I knew about the "not less than 1 second" restriction, but not the "only
> once a day" restriction. Can you confirm that the latter restriction is
> indeed the case please?

Oh, I made a little mistake.

It doesn't recalculate the factor if it did in the last 23 hours,
too make it more accurate. The calculation isn't really
accurate, but gets more accurate the longer the period between
them.

In adjust_drift_factor():

} else if ((hclocktime - adjtime_p->last_calib_time) < 23 * 60 * 60) {
if (debug)
printf(_("Not adjusting drift factor because it has been less than a "
"day since the last calibration.\n"));

Kurt

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.164 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site