
CODE: [Copy to clipboard]出错时的两个变量分别为SET /A S=(((%TIME:~7,1%-S9)*2+1)%%2*(%TIME:~7,1%-S9)*10)/(((%TIME:~7,1%-S9)*2+1)%%2*(%TIME:~7,1%-S9)*10-1)
CODE: [Copy to clipboard]@ECHO OFF
SET TIMEON=%TIME:~0,-3%
:TIME1
SET /A S9=%TIME:~7,1%,S1+=S
SET /A H=S1/3600,M=S1%%3600/60,S=S1%%3600%%60
ECHO stopwatch %H%:%M%:%S% current:%TIME:~0,-3% timeon:%TIMEON% secs=%S1% %S9%
SET /A S1/(S1-100000) 2>nul||GOTO NEXT
:TIME0
SET /A S=(((%TIME:~7,1%-S9)*2+1)%%2*(%TIME:~7,1%-S9)*10)/(((%TIME:~7,1%-S9)*2+1)%%2*(%TIME:~7,1%-S9)*10-1)
GOTO TIME%S%
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |