why same python code has different clock time?
问题 I'm benchmarking my server using following python code: import time initial_clock = time.clock() res = 0 for i in range(1, 10000000): res += i * i print (time.clock() - initial_clock) When I run it multiple times I get different execution times from 2.163377 seconds to 2.970836 seconds. I know same code may have different execution time due to variation in CPU load but as is said in time.clock documentation it only considers current process clocks, so it should have same execution time using