bat批处理之统计脚本执行时间

需求:

统计bat脚本的执行时间

脚本:

@echo off
set /a startS=%time:~6,2%
set /a startM=%time:~3,2%
echo %time%
call your.bat  
set /a endS=%time:~6,2%
set /a endM=%time:~3,2%
echo %time%
set /a diffS_=%endS%-%startS%
set /a diffM_=%endM%-%startM%
echo cost:%diffM_% %diffS_% 
pause

 

你可能感兴趣的:(其他)