I've noticed that pyautogui.PAUSE makes my program run slightly slower. I'm wondering why this is?
What is the difference between Python's pyautogui.PAUSE and time.sleep?
20.2k views Asked by Kailyn At
2
There are 2 answers
0
On
The method sleep() suspends execution for the given number of seconds. Example:
time.sleep(5)
the execution will be suspended for 5 seconds.
In the case of pyautogui.PAUSE
allows you to add delays after PyAutoGUI’s functions.
For more information you could read:
sleep and
pause
So, both functions add pause, that may be the reason for slowness. I hope this help you.
From the source code:
So essentially, each function is slowed down by 0.1 seconds, hence the slowdown.