delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/21/20:00:12

Message-Id: <199707212357.TAA15893@delorie.com>
Mime-Version: 1.0
Date: Mon, 21 Jul 1997 19:52:16 -0500
To: djgpp AT delorie DOT com
From: Conrad Wei-Li Song <conradsong AT mail DOT utexas DOT edu>
Subject: Re: Standard tiiming func's & O3+ cause odd errors

At 05:39 PM 7/21/97 -0400, you wrote:
>Sigh.  CLOCKS_PER_SEC is 91.  UCLOCKS_PER_SEC is 1193180.
>
>The clock() function is accurate to 1/18.2 sec; the "91" is there so
>that everything is (sort of) integer math.
>
>The uclock() function really is accurate to better than 1uS.  It uses
>the hardware timing chip, which often doesn't work in Win95 but does
>elsewhere.
>
I think I've said this before.  Win95 uses PIT mode-3 not mode-2.  You
can reprogram to PIT to use mode-2 with no apparent side effects to other
programs.  This also works because the PIT is virtualized in a DOS box.
I've gotten very good and fairly stable results with joystick poll code
this way.

- Raw text -


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