I just updated, I think from 1.41 to 1.43, and now getMillisecondCounterHiRes() isn’t high resolution any more.
It used to work fine (except for the fact that the pitch bend algorithm I was timing was too slow!), but now it returns values of 15, 16 or zero ms, so fractions of milliseconds don’t exist.
Slow though it may be, my algorithm doesn’t reach THAT high…
This is Win 32, where the notable change is the PCI drift bug fix in getHighResolutionTicks().
You must be using a nicer PC than me! Over here, I get just 3579545 ticks so the maths was no problem. Thanks for looking into it for me! I assume this’ll work:
From what I’ve observed, Windows XP on a multiprocessor machine or 64-bit XP on any machine uses the RDTSC instruction when you call QueryPerformanceCounter. That obviously means that the clock frequency will be the same as the CPU clock.
On that same note, I just learned about this XP update that is supposed to fix performance issues on multiprocessor machines, including correcting for clock drift between the processors:
I don’t know that the timing resolution actually IS that good, kind of like double vs. float audio.
It was a nicer PC a few years ago. I still holds its ground against entry-level audio PCs, but it does only have one core, 32-bit.
Now I can get back to the eternal task of speeding up my code without making it sound too much worse, always looking for that rare optimization that makes it run faster and sound better.