Subject: Re: PRAM & the Time Manager
To: Rick C. Petty <pett0019@gold.tc.umn.edu>
From: Charles J. Williams <chas@volt.nrl.navy.mil>
List: port-mac68k
Date: 03/10/1996 10:08:08
In message <Pine.SOL.3.91.960309163858.15951C-100000@gold.tc.umn.edu>,"Rick C. 
Petty" writes:
>every so often...  I'm not sure how accurate of a time one would need 
>anyway, and how accurate can we get using a machine that only keeps track 
>of # of seconds...???

If I understand the problem correctly, One of the VIA interrupts is
responsible for updating this time variable.  The interrupt runs at
the lowest priority, and attempts to run at HZ times per seconds.  So
its slightly more accurate than the RTC.

Various drivers (mostly the scsi disk driver i believe) disables interrupts
and then calls delay() for various reasons.  This causes the clock to loose
time.

If you dont have a network connection you cant use the NTP solution.
I can only think of 3 ways to work around this:  periodically compare
the RTC and local time, and slew local time to match RTC (ugly but
doable, although this might conflict with NTP moving things around),
change the interrupt the timer is using so it isnt disabled as often
(i dont think is an option), or keep time of the total time lossage
caused by delay() when interrupts are disabled and apply them to 
the local clock (this would only catch the bulk of lost time since
some time is consumed doing actual operations).

Does any of this make sense?