Mail Archives: djgpp/1999/07/07/19:18:06

Sender: nate AT cartsys DOT com
Message-ID: <>
Date: Wed, 07 Jul 1999 16:14:42 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.10 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Timing
References: <377CC7E6 DOT EB82B079 AT hotmail DOT com> <377E4A2D DOT F023FABE AT cartsys DOT com> <3782058F DOT 8F1D0834 AT americasm01 DOT nt DOT com>
Reply-To: djgpp AT delorie DOT com

Rolf Campbell wrote:
> Nate Eldredge wrote:
> > There is also the
> > CPU's timestamp counter, if you have a Pentium or K5 or better-- it's
> > accurate to within one clock of your CPU (between 2 and 10 ns depending
> > on the CPU speed).  Ask me if you want more info on this.
>     That can have problems under windows as well.  I've got rediculous
> results under Win95/3.1 occasionally.

Presumably because your program is scheduled out.  You'll have problems
like that under any multitasking OS, unless it provides some way to find
the CPU time used by a process (and this is typically accurate only to
the nearest timeslice, which is usually *at least* 1 ms).

But yes, you are right.  High-precision timing should really be done on
a single-tasking platform, like plain DOS.

Nate Eldredge
nate AT cartsys DOT com

- Raw text -

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