Because the PC clocks are *GENERALLY* driven by a periodic interrupt
generated by the processor or related circuitry, rather than working
directly from a dedicated physical time-base. Commonly, this is a
sub-function of the PC's bus-timing signal, which often isn't anywhere
near a number that's conveniently turned into a "one second has elapsed"
signal. So when your computer does something that "shuts down", "locks
out", or otherwise disturbs the normal interrupt generation/handling
process, it loses track of what time it is. Newer systems generally
include a "correction" mechanism - something along the lines of "If
interrupts were disabled for disk I/O activity, adjust the clock forward
by X amount". If they were disabled for keyboard activity, adjust the
clock forward by Y amount", and so on. Some of the "X"s and "Y"s are
more accurate than others - some are dead on - "A VBL interrupt locks
out the interrupt generation/handling mechanism for precisely "N"
thousandths of a second. Before returning from this interrupt, advance
the RTC (Realtime Clock) by exactly that amount." - or might be
inherently inaccurate estimations - "Disk I/O will never disable
interrupts for less than "W" nor more than "Z" ticks of the clock, so
adjust the clock forward "Z-W/2" ticks every time Disk I/O happens" (AKA
"Take the average").
Other factors include whether the machine has been overclocked (which
will change the base rate at which the clock interrupt is generated,
among other timing alterations), whether your usage requires more or
less adjustment than the algorithm (if any) for adjusting was planned to
compensate for, and similar.
Meanwhile, the digital clock in your toyota is a dedicated device. It
doesn't count on interrupts to generate a "tick" of the clock. It sits
there counting pulses coming off a crystal dedicated to the purpose of
doing nothing but vibrating at the right frequency, doing some math to
convert pulses to clock-time, and displays the result, all without ever
being interrupted, blocked, locked out, or whatever.
Long and short of it: A PC's realtime clock is a compromise design, and
runs on pulses that come at a frequency that may or may not be an
accurate timebase, depending on many factors that the clock has no (and
by its very nature, cannot get) knowledge of, while a "real" clock - one
that does nothing but tell time - operates on pulses that come at
unvarying intervals, and never loses track of time - at least in
relation to itself... It's entirely within the realm of possible to have
two near-identical clocks "drift" with respect to each other because
although they're close to being identical, there's no such thing as two
bits of crystal that resonate at *EXACTLY* the same rate. The difference
in rates may be 38 digits to the right of the decimal, but over the long
haul, that tiny error adds up to a lost or gained second, and sooner or
later, the two clocks drift in comparison to each other.
--
Don Bruder -
[email protected] <--- Preferred Email - SpamAssassinated.
Hate SPAM? See <
http://www.spamassassin.org> for some seriously great info.
I will choose a path that's clear: I will choose Free Will! - N. Peart
Fly trap info pages: