0

I want to make my program wait for x seconds after an if statement is triggered but I don't want my whole program to sleep cause I still want it to work.

So time.sleep is out of the question, what options are there?

popsmoke
  • 75
  • 1
  • 1
  • 6
  • Does a [busy loop](https://stackoverflow.com/questions/4911397/what-is-a-busy-loop) work for you? – Balaji Ambresh Jun 08 '20 at 16:37
  • 2
    If you're using asynchronous code, look into [`asyncio.sleep(x)`](https://docs.python.org/3/library/asyncio-task.html#sleeping) – Diggy. Jun 08 '20 at 16:38
  • There's many threads on SO regarding this topic. Pick whatever solution you feel works for you. But essentially, your key words you're looking for is "python run multiple functions in parallel". Best of luck on your project that we have no information on because you didn't give us any code :) – Torxed Jun 08 '20 at 16:45

0 Answers0