T
T
tooohell2021-08-19 09:06:18
Python
tooohell, 2021-08-19 09:06:18

How to make a report of the time after which some action will be played?

You need to make a report after which it will be possible to do some action, BUT if a person tries to do this action before the end of the report, something else will happen

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aab137, 2021-08-19
@aab137

import time
set_time = time.time()+60  # 60 - сколько времени идет отсчет
if time.time()<set_time:
    print('не беги вперед паровоза')
else:
    print('действие сделано')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question