Date: Sun, 7 Nov 1999 17:26:09 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: N J Chackowsky cc: djgpp AT delorie DOT com Subject: Re: DJGPP/Gnu Pascal problem In-Reply-To: <38231BF1.91ADD896@arcticmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 5 Nov 1999, N J Chackowsky wrote: > t1, t2 : longword; > seconds : real; > begin > t1 := uclock; > {do something -- in this case, a simple sort of an array of integers} > t2 := uclock; > seconds := (t2-t1)/TXPRS; > writeln(seconds:0:5); > > If I do a selection sort of 1000 integers, the writeln reports > preposterously large results. If I move up to 10000 items, it *appears* > to work correctly. You didn't tel on what OS this happens. If it was on Windows 9X, then this is a known problem: uclock reprograms the timer chip, but Windows delays the effect of that reprogramming for at least one timer tick, so the initial values you get from uclock may be negative on Windows. The next release of DJGPP works around this Windows misfeature. You can get a source-level patch for uclock from the DJGPP bug-tracking system, http://www.delorie.com/djgpp/bugs/. > [I've had ***BAD*** luck lately posting so I'm being paranoid here... no > html; posting to one group, ahhhhh... looks goood?...] No HTML this time; thanks.