0
Q:

python time code

import time

t0 = time.time()
code_block
t1 = time.time()

total = t1-t0
6
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  
1
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!")
3
from timer import Timer
t = Timer()
t.start()
# Run stuff here.
t.stop()  
0

New to Communities?

Join the community