kapiaba Posted July 6, 2016 Report Share Posted July 6, 2016 Saber o tempo que leva para compilar @echo off SET STARTTIME=%TIME% if not exist TEMPO.LOG @echo Compilação FiveWin For xHarbour >> TEMPO.LOG @echo ------------------------------- >> TEMPO.LOG @echo Compilação FiveWin For xHarbour >> TEMPO.LOG REM compilacao linkedicao dos modulos rem fim da compilacao SET ENDTIME=%TIME% for /F "tokens=1-4 delims=:.," %%a in ("%STARTTIME%") do ( set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" ) for /F "tokens=1-4 delims=:.," %%a in ("%ENDTIME%") do ( set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" ) rem Calculate the elapsed time by subtracting values set /A elapsed=end-start set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100 if %hh% lss 10 set hh=0%hh% if %mm% lss 10 set mm=0%mm% if %ss% lss 10 set ss=0%ss% if %cc% lss 10 set cc=0%cc% set DURATION=%hh%:%mm%:%ss%,%cc% echo Data : %date% echo Inicio : %STARTTIME% >> TEMPO.LOG echo Fim : %ENDTIME% >> TEMPO.LOG echo --------------- >> TEMPO.LOG echo Tempo : %DURATION% >> TEMPO.LOG Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.