## CSDN博客

### BAT脚本：等待（sleep/wait）固定时间

You can ping a random address and specify the desired timeout:

ping 123.45 . 67.89 - n 1 - w 10000 > nul 

And since the address does not exists, it'll wait 10,000 ms (10 seconds) and returns.

• The -w 10000 part specifies the desired timeout in milliseconds.
• The -n 1 part tells ping that it should only tries once (normally it'd try 4 times).
• The > nul part is appended so the ping command doesn't output anything to screen.
0 0