time - Reset default_timer reference point in python -


i want time parts of code timeit. suggestions in following way:

from timeit import default_timer timer  start = timer() # stuff end = timer() print(end - start)   

this because 'timer' continues counting time. docs reference point undefined (but i'm pretty sure, it's first time call timer). there way reset reference point? e.g. like

resete_timer() # stuff end = timer() print(end) 

i know, there's no real advantage of second code, prefer way. it's more out of curiosity


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -