Jump to content
Fivewin Brasil

Saber o tempo que leva para compilar


kapiaba

Recommended Posts

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


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...