I would like to know how to put a time delay in a Python script.
转载于:https://stackoverflow.com/questions/510348/how-can-i-make-a-time-delay-in-python
I would like to know how to put a time delay in a Python script.
转载于:https://stackoverflow.com/questions/510348/how-can-i-make-a-time-delay-in-python
You can use the sleep() function in the time module. It can take a float argument for sub second resolution.
from time import sleep
sleep(0.1) # Time in seconds.