I\'m programming in python on windows and would like to accurately measure the time it takes for a function to run. I have written a function \"time_it\" that takes another
Similar to @AlexMartelli's answer
import timeit timeit.timeit(fun, number=10000)
can do the trick.