In the MS-DOS world, I took the same function and checked it, and it worked
beautifully. The only time the tick changed was when the counter wrapped. In
DOS, I can do this without any problem.
Obviously, with the tick out of sync with the counter like this, timing is worthless! Can any windows wizard out there explain why this would happen? I would love to fix this, and get good timing.
Much thanks for any help with this bizarre problem!
Jami Bradley
Intelligent Energy Corporation
Bra...@Colorado.edu
I think the problem is that Windows is "virtualizing" the timer chip. So
you're not reading the "real" timer chip registers -- rather, you're
reading a software emulation of the timer chip. I seem to recall running
into a related problem a couple of years ago, in that Windows is actually
emulating the older timer chip (I forget the part #) that was in the original
IBM PC, not the (more capable) timer chip used in everything since the
PC AT. So some of the hardware functions available on the timer chip are
actually being hidden as well.
I think there's a setting in one of the .INI files that lets you turn
timer chip virtualization off. This may have other undesirable effects,
however; I've never tried it myself.
There are also some higher resolution timing facilities available as part
of the Multimedia API functions. I seem to recall that in order to use them,
you need to create a DLL with a callback function, which Windows then
invokes at your specified timer interval. Check the SDK documentation for
details...
-- Mike Uchima
-- uch...@fnal.fnal.gov