Useing the processor clock, or get time in Femptoseconds
Littlefield, Tyler
tyler at tysdomain.com
Sun Jan 30 23:14:11 EST 2011
If you are on windows, you can use high-resolution timers. What you are
trying is physically impossible though: lets say you have a processor
that runs at 2.5 GHz. that's 2.5 billion cycles per second, give or take
a few. So, the lowest you can go is nanoseconds. You're trying to time
like 10x the processor's actual speed, and you're not going to get
timing that good. so, lower your bar a bit; the highest you will get is
nanoseconds with high-res timers. (I'm not sure what the equivalent of
this is on *nix, or whether or not python supports it on either
platform. I think you'll end up making a DLL call, though I could be wrong).
More information about the Python-list
mailing list