I've been using a fairly simple time script to track a software's run time measurement with clock time measurement to ensure they are roughly in sync. However, I've realized that this method will utterly fail if the clock goes past midnight.
Right now I'm doing this:
set start=!time!
[Code to measure goes here]
set end=!time!
for /F "tokens=1-4 delims=:.," %%a in ("!start!") 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 ("!end!") do (
set /a "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
set /A elapsed=end-start
echo Elapsed Time: !elapsed!
Does anyone know of any neat little tricks I could use to circumvent this problem?