start = time.clock()
print("test ")
time.sleep(1)
print(time.clock()-start)
The final line prints the result normally but sometimes it gives a result less than 1 (0.9962501944182808 or 0.9886929485969909 etc.)
If I have made the code sleep for 1 second with time.sleep(1)
I would have thought that the result would always greater than 1.
It is not precise so how can I calculate time consumed by my code with built-in modules?