I'm trying to measure the time a function I made uses like this:
start = time.time()
function("does_something")
end = time.time()
function_time = end - start
However, every time I run this I get a (slightly) different solution. What is the reason for this? I know I can do a Monte Carlo Simulation to make this measurement somewhat more reliable but I am curious to know what the reason for this difference in results is.