netmaestro wrote:Rescator, you misread the function call. You reference QueryPerformanceCounter, where my code uses QueryPerformanceFrequency
which seems like it should work, and it does on all my machines. I don't know why it doesn't work on some machines, but I guess it's not too reliable.
QueryPerformanceFrequency is used to get the resolution of the high-resolution performance counter,
the returned value is then used with QueryPerformanceCounter result to calculate the time passed.
QueryPerformanceFrequency has nothing to do with the cpu or MHz of the cpu,
it is related to the highest resolution performance counter,
in your case the pentium systems use the cpu cycle counter,
in the case of AMD cpu's most use either a cpu speed independent crystal/counter, or a external clock (bios)
and in the case of scientific equipment it could even be a atomic clock/timer device.
PS! Unless I'm mistaken, cpu cycles themselves are unreliable for MHz
(millions of instructions per second) meassurement as some cpu's are
able to execute multiple instructions in a single cycle.
Which is why benchmark tools use MIPS and FLOPS rather
than MHz in it's comparison tests.
It would be fun however to do a NOPS benchmark routine:P
Sorry, couldn't resist a little asm joke there, hope some of you got it
