www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/08/00:00:48

From: michael DOT mauch AT gmx DOT de (Michael Mauch)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: large variation in run-time; revisited
Date: Fri, 08 May 1998 02:17:08 +0200
Organization: Gerhard-Mercator-Universitaet -GH- Duisburg
Lines: 29
Message-ID: <6itisu$1t5$1@news-hrz.uni-duisburg.de>
References: <354DAFD3 DOT 8D277F06 AT CPRO DOT DLO DOT NL> <6iktlt$4j1 AT argo DOT telecom DOT cz> <PSxEvgVLkg3c AT ns2> <3551DC0B DOT 7434DB6E AT CPRO DOT DLO DOT NL>
NNTP-Posting-Host: ppp92.uni-duisburg.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, 07 May 1998 17:06:35 +0100, Johan van Ooijen
<J DOT W DOT vanOOIJEN AT CPRO DOT DLO DOT NL> wrote:

> Just today I got the results of simulations that ran on a PC, for which
> I am very sure that was not finished before last tuesday; I saw the
> program still active on monday. However, in the results-output-file it
> mentions that the program was finished already on the thursday morning,
> several days earlier!! The date of this file is identical (!!) to the
> date mentioned in the file. So I suspect that one way or another the
> internal clock is affected by the program, but as it seems not
> systematically. MSDOS must use the same clock for the date of the file.

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. 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. The
time() function (at least the one from DJGPP v2.01) uses the DOS clock.
Try using uclock() instead, if DJGPP 1.x has this or if you can upgrade
to v2.01.

Alternatively, get a program that sets the DOS clock according to the
RTC. One of these programs is atrtc.sys, which comes with Kris
Heidenstrom's PC Timing FAQ (pctim003.zip, on SimTel mirrors). You need
at least a PC-AT for this, because there is no RTC in PC-XTs or plain
PCs - you never know, if you're still using gcc 2.6.0 ;-)

Regards...
		Michael

- Raw text -


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