code temporel python
import time
t0 = time.time()
code_block
t1 = time.time()
total = t1-t0
Difficult Dunlin
import time
t0 = time.time()
code_block
t1 = time.time()
total = t1-t0
t = time.localtime() # Gets the local time
current_time = time.strftime("%H:%M", t) # Gets the time in the desired format
current_time = "The time is " + current_time
import time
timer_length = float(input("How many seconds would you like you're timer to be set for? "))
time.sleep(timer_length)
print("Done!")