Mail Archives: djgpp/1999/10/22/09:56:10
Clemens Valens writes:
> When I arrived this morning at the office, my PC clock had the correct
> time. Today I spend most of the day in DOS, programming using RHIDE,
> DJGPP and Allegro. At the end of the day my PC clock was about 1 hour
> and 25 minutes behind.
Allegro is constantly reprogramming the timer chip to generate
interrupts at the right times, so yes, it is quite possible that
even though it tries to keep the BIOS clock running at the standard
rate, if this went wrong for some reason your clock would get out
of sync. I've never seen more than very tiny drift in the latest
versions (maybe a second per hour running), but you could easily
get larger errors if your machine is bogging down due to too
high an interrupt frequency for some reason, or if Allegro was
crashing and failing to reset the timer. It tries to hook that
into the emergency shutdown code, but that isn't always possible
in a bad crash, and if you get dumped back to DOS without a timer
reset, you could easily gain or lose many hours within just a few
minutes...
In any case, this is only the PIT timer that is affected: the RTC
chip is still correct, so any errors will be corrected as of your
next reboot.
Shawn Hargreaves.
- Raw text -