From: Tom Burgess Newsgroups: comp.os.msdos.djgpp Subject: Re: testing uclock() Date: Fri, 25 Apr 1997 21:15:50 -0700 Organization: BCTEL Advanced Communications Lines: 18 Message-ID: <33618176.377@bc.sympatico.ca> References: <1 DOT 5 DOT 4 DOT 32 DOT 19970424124818 DOT 002d7ec8 AT ubeclu DOT unibe DOT ch> NNTP-Posting-Host: pntn02m01-36.bctel.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Roger Noss wrote: > > I am trying to follow the many recommendations to use uclock() but am > getting inconsistent results. I am working in a DOS window of WinNT3.51 on > a 200MHz Pentium Pro. Don't have the answer, but a few observations: - printf of uninitialized t0 is puzzling - use of short ints on Pentiums is expensive (more CPU cycles) - Since uclock messes with the timer hardware, I am surprised NT doesn't barf. Uclock has no error return code. Maybe uclock just fails on NT and is returning garbage? - for best timing, should make sure dt[] is in cache before using it to record results, otherwise cache misses will confuse timing. Just clear it to zero or something. regards, tom