With the Time module in python is it possible to measure elapsed time? If so, how do I do that?
I need to do this so that if the cursor has been in a widget for a certain duration an event happens.
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.
You can also write simple decorator to simplify measurement of execution time of various functions:
Usage:
You can profile more then one function simultaneously. Then to print measurements just call the print_prof_data():