Is there any way to read out the timestamp-counter on x86 CPUs in Python?
I know that using rdtscp is bad and using rdtsc is even worse. But trust me I really need that value, or at least some approximation of that value.
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
With normal python, time.clock() is the most accurate thing you will get.
If you really want to have processor ticks, just remember the time which is needed to execute this python call – so Python is not the right language to do microsecond time measurement.