import time
import random

input("Press enter to start")

wait_time = random.randint(1, 20)
time.sleep(wait_time)
start_time = time.time()

input("Press enter to stop")

end_time = time.time()

print("Started at " + time.strftime("%X", time.localtime(start_time)))
print("Ended at " + time.strftime("%X", time.localtime(end_time)))

print("Your reaction time was {} seconds".format(end_time - start_time))

# to measure elapsed time regardless of the change of clock, use time.monotonic() this clock is not affected by system clock updates
# to measure elapsed time user perf_counter()
# to measure CPU process time use process_time()

c8cb33b1c1310ec04eecf7a4b17f753f5a298a17
<mask token>

<mask token>
input('Press enter to start')
<mask token>
time.sleep(wait_time)
<mask token>
input('Press enter to stop')
<mask token>
print('Started at ' + time.strftime('%X', time.localtime(start_time)))
print('Ended at ' + time.strftime('%X', time.localtime(end_time)))
print('Your reaction time was {} seconds'.format(end_time - start_time))

<mask token>
input('Press enter to start')
wait_time = random.randint(1, 20)
time.sleep(wait_time)
start_time = time.time()
input('Press enter to stop')
end_time = time.time()
print('Started at ' + time.strftime('%X', time.localtime(start_time)))
print('Ended at ' + time.strftime('%X', time.localtime(end_time)))
print('Your reaction time was {} seconds'.format(end_time - start_time))

import time
import random
input('Press enter to start')
wait_time = random.randint(1, 20)
time.sleep(wait_time)
start_time = time.time()
input('Press enter to stop')
end_time = time.time()
print('Started at ' + time.strftime('%X', time.localtime(start_time)))
print('Ended at ' + time.strftime('%X', time.localtime(end_time)))
print('Your reaction time was {} seconds'.format(end_time - start_time))

import time
import random

input("Press enter to start")

wait_time = random.randint(1, 20)
time.sleep(wait_time)
start_time = time.time()

input("Press enter to stop")

end_time = time.time()

print("Started at " + time.strftime("%X", time.localtime(start_time)))
print("Ended at " + time.strftime("%X", time.localtime(end_time)))

print("Your reaction time was {} seconds".format(end_time - start_time))

# to measure elapsed time regardless of the change of clock, use time.monotonic() this clock is not affected by system clock updates
# to measure elapsed time user perf_counter()
# to measure CPU process time use process_time()
