add delay in python
-
@Dl10 if you want your application to "pause" for some period of time, I'd say use Python's time.sleep(delay).
What @JonB suggested is using a "single-shot" timer which let's you do something once the timer goes off.
So these two approaches are slightly different. -
@Pablo-J.-Rogina
It's difficult to guess what the OP means, but he says:my intent is function style time.sleep but Other.
but it seems he is aware of Python
time.sleep(delay)
but doesn't want to use it...! :) -
Sleep() function actually suspends the processing of the thread in which it is called by the operating system, allowing other threads and processes to execute while it sleeps. With multiple threads and processes, sleep() suspends your thread - it uses next to zero processing power.