How do I get my Python program to sleep for 50 milliseconds?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
from time import sleep
sleep(0.05)
Reference
回答2:
Note that if you rely on sleep taking exactly 50 ms, you won't get that. It will just be about it.
回答3:
import time
time.sleep (50.0 / 1000.0);