ping -n can achieve delay, but I recognize this is not a good way, because I checked the CPU usage, and when pinging, it has reached 50%. Such a delay, what program are you going to do?
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
DigestI
View 32,800 Replies 71
Originally posted by nvflash at 2006-9-29 07:47:
at seems to require service support. Now many machines are optimized and this service is not enabled
@echo off
:loop
echo %time%
ping 127.1 -n 2 1>nul
echo %time%
goto loop
@echo off
:loop
echo %time%
ping 1 -n 1 -w 1000 2>nul 1>nul
echo %time%
goto loop
@echo off
:loop
echo %time%
call :delay 1000
echo %time%
goto loop
:delay
set /a num=num + 1
if %num% geq %1 (set num=) && goto :eof
rem for /l %%i in (1,1,%1) do echo. >nul
goto :eof
@echo off
:loop
echo %time%
msg %username% /time:20 /w "Delaying, click OK to cancel delay!"
echo %time%
goto loop
@echo off
echo Wscript.Sleep WScript.Arguments(0) >%tmp%\delay.vbs
:loop
echo %time%
cscript //b //nologo %tmp%\delay.vbs 2000
echo %time%
goto loop
Originally posted by nvflash at 2006-9-29 09:11:
May I ask the moderator, besides %time%, what are other system-built-in variables?
| Rater | Score | Time |
|---|---|---|
| — | +1 | 2010-01-27 09:13 |
| newborenee | +1 | 2010-03-10 22:14 |

Originally posted by lxmxn at 2006-11-3 23:43:
Hehe, thank you upstairs for providing another small tool for delay. Download it and try it~~
I remember there is another tool called sleepx, which can be precise to milliseconds. I wonder this sle ...
