Oct-23-2019, 07:55 PM
I'm trying to find a simple timing snippet to measure response time.
This repeatedly outputs "it took 0.0 seconds." Why?
This repeatedly outputs "it took 0.0 seconds." Why?
import time
y = input("What is 4 * 3?")
start = time.time()
if y=="12":
end = time.time()
print("it took", (end-start), "seconds")
else: quit()I don't understand the time class (object?)... I just found it online. Any explanation would help. Thanks!
