While the sleep() function is executed, can another method in the same program run?
If not, how can I make 1 method run while the other is delayed?
Printable View
While the sleep() function is executed, can another method in the same program run?
If not, how can I make 1 method run while the other is delayed?
Yes. This technique is called multi threading.Quote:
While the sleep() function is executed, can another method in the same program run?
You can: Run either both in a thread or run one in a thread and the other one in the "main thread" (e.g. your application instance).Quote:
If not, how can I make 1 method run while the other is delayed?