陪伴而非守候
import time
time.sleep(5) # Delays for 5 seconds. You can also use a float value.下面是另一个示例,它大约每分钟运行一次:import timewhile True:
print("This prints once a minute.")
time.sleep(60) # Delay for 1 minute (60 seconds).