Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 524 Bytes

25.md

File metadata and controls

23 lines (17 loc) · 524 Bytes
rank vote view answer url
25 2774 3086312 13 url

在 Python 里如何手工进行延迟?


import time
time.sleep(5)   # Delays for 5 seconds. You can also use a float value.

这里有另一个例子展示每隔差不多一分钟运行一次:

import time
while True:
    print("This prints once a minute.")
    time.sleep(60) # Delay for 1 minute (60 seconds).