Subject: Re: todr changes to improve clock accuracy across sleeps &
To: Perry E. Metzger <>
From: Richard Earnshaw <>
List: tech-kern
Date: 09/07/2006 18:05:14
> It would be nice if, optionally, one could wait up to one second,
> spinning, for the RTC chip to turn over a fresh second before doing
> inittodr. Similarly, one would, optionally, wait up to one second
> before doing the resettodr -- that could be done with an interval
> timer controlled sleep since the system clock has high precision.

> I suggested making this optional (and possibly sysctlable) because
> some people won't care and will resent the one second additional
> delay.

Why not leave the setting of the system clock as is (if you aren't on 
line, then clock precision to within a second is just fine); and when 
shutting down, don't write the RTC if it is within (say) 1 second of the 
current time.  This way you've preserved essentially all the accuracy of 
your RTC without stalling at any point.