1import time
2
3t0 = time.time()
4code_block
5t1 = time.time()
6
7total = t1-t0
1t = time.localtime() # Gets the local time
2current_time = time.strftime("%H:%M", t) # Gets the time in the desired format
3current_time = "The time is " + current_time
1from timer import Timer
2t = Timer()
3t.start()
4# Run stuff here.
5t.stop()
1import time
2timer_length = float(input("How many seconds would you like you're timer to be set for? "))
3time.sleep(timer_length)
4print("Done!")