Message-ID: From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: Allegro slows down PC clock? Date: Fri, 22 Oct 1999 12:58:33 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Reply-To: djgpp AT delorie DOT com 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.