Mailinglist Archive: opensuse-de (5189 mails)
| < Previous | Next > |
Re: cmos-clock!
- From: bock@xxxxxxxx (Andreas Bock)
- Date: Fri Oct 01 12:14:26 1999
- Message-id: <37F4A5A2.17825DD9@xxxxxxxx>
Andreas Bock schrieb:
Wahrscheinlich doch nicht.Berichtigung: Ist nicht das gleiche.
--hctosys schreibt die HW-uhr in die Systemzeit.
--adjust berechnet die Zeitdrift der HW-Uhr gegenüber der System-Zeit
und passt dieHW-Uhr an.
man hwclock:
[schnipp]
The Adjust Function
The Hardware Clock is usually not very accurate. However,
much of its inaccuracy is completely predictable -- it
gains or loses the same amount of time every day. This is
called systematic drift. Hwclock's "adjust" function lets
you make systematic corrections to correct the systematic
drift.
It works like this: Hwclock keeps a file, /etc/adjtime,
that keeps some historical information. This is called
the adjtime file.
Suppose you start with no adjtime file. You issue a
hwclock --set command to set the Hardware Clock to the
true current time. Hwclock creates the adjtime file and
records in it the current time as the last time the clock
was calibrated. 5 days later, the clock has gained 10
seconds, so you issue another hwclock --set command to set
it back 10 seconds. Hwclock updates the adjtime file to
show the current time as the last time the clock was cali-
brated, and records 2 seconds per day as the systematic
drift rate. 24 hours go by, and then you issue a hwclock
--adjust command. Hwclock consults the adjtime file and
sees that the clock gains 2 seconds per day when left
alone and that it has been left alone for exactly one day.
So it subtracts 2 seconds from the Hardware Clock. It
then records the current time as the last time the clock
was adjusted. Another 24 hours goes by and you issue
another hwclock --adjust. Hwclock does the same thing:
subtracts 2 seconds and updates the adjtime file with the
current time as the last time the clock was adjusted.
Every time you calibrate (set) the clock, hwclock recalcu-
lates the systematic drift rate based on how long it has
been since the last calibration, how long it has been
since the last adjustment, what drift rate was assumed in
any intervening adjustments, and the amount by which the
clock is presently off.
A small amount of error creeps in any time hwclock sets
the clock, so it refrains from making an adjustment that
would be less than 1 second. Later on, when you request
an adjustment again, the accumulated drift will be more
than a second and hwclock will do the adjustment then.
[end schnipp]
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: suse-linux-unsubscribe@xxxxxxxx
For additional commands, e-mail: suse-linux-help@xxxxxxxx
| < Previous | Next > |