Message-Id: <199707212357.TAA15893@delorie.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 21 Jul 1997 19:52:16 -0500 To: djgpp AT delorie DOT com From: Conrad Wei-Li Song Subject: Re: Standard tiiming func's & O3+ cause odd errors Precedence: bulk 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.