html tool

2018年7月3日星期二

how to sleep in windows command line

https://superuser.com/questions/48231/how-do-i-make-a-batch-file-wait-sleep-for-some-seconds

方法一:
ping 127.0.0.1 -n 6 > nul
127.0.0.1 is the localhost IP address.
-n 6 - there is a 1s delay between each ping, so for a 5s delay you need to do 6 pings.
> nul - suppress the output.
方法二:
I'm very surprised no one has mentioned:
C:\> timeout 5

没有评论:

发表评论