Sturla Molden wrote:
Antoine Pitrou skrev:
It certainly is. But once again, I'm no Windows developer and I don't have a native Windost host to test on; therefore someone else (you?) has to try.
I'd love to try, but I don't have VC++ to build Python, I use GCC on Windows.
Anyway, the first thing to try then is to call
timeBeginPeriod(1);
once on startup, and leave the rest of the code as it is. If 2-4 ms is sufficient we can use timeBeginPeriod(2), etc. Microsoft is claiming Windows performs better with high granularity, which is why it is 10 ms by default.
Sturla
That page claims: Windows uses the lowest value (that is, highest resolution) requested by any process. I would posit that the chance of having some random process on your machine request a high-speed timer is high enough that the overhead for Python doing the same is probably low. John =:->