delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/08/05:30:27

Date: Fri, 8 May 1998 12:27:52 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Michael Mauch <michael DOT mauch AT gmx DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: large variation in run-time; revisited
In-Reply-To: <6itisu$1t5$1@news-hrz.uni-duisburg.de>
Message-ID: <Pine.SUN.3.91.980508122725.9473A-100000@is>
MIME-Version: 1.0

On Fri, 8 May 1998, Michael Mauch wrote:

> PCs/DOS have many clocks: one of them is the real time clock (RTC),
> another one is the BIOS/DOS clock which is initialized at boot time and
> then incremented every once in a while by the interrupt 9 handler.
                                                ^^^^^^^^^^^
That's interrupt 8 (9 is for the keyboard).

> If
> you let your computer run for days, this DOS clock will run all on its
> own and never get re-synchronized; and it's not really accurate.

While this is true, I doubt that a reasonable system would get several
days of time skew if left alone.  FWIW, it never happened to me on any
machine I ever used.  The crystal which generates the system clock
tick is usually quite accurate, unless something's wrong with the
motherboard.

> Try using uclock() instead, if DJGPP 1.x has this or if you can upgrade
> to v2.01.

v1.x didn't have `uclock' in its library.  But even if it did, it
won't help, since `uclock' reads the same timer chip which generates
Interrupt 8.  If those interrupts are inaccurate, so will be
`uclock'.

- Raw text -


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