delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/22/09:56:10

Message-ID: <F77915E7F086D31197F4009027CC81C9027B0B@ASL-NT-EXCH2>
From: Shawn Hargreaves <SHargreaves AT acclaimstudios DOT co DOT uk>
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)
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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019