Mail Archives: djgpp/1997/07/21/20:00:12
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 -