1.

Solve : measuring elapsed time of a task evoked in a dos batch file?

Answer»

Antonio POSTED a 2nd link that talks about the 24 hour problem.
Dave just added ONE line of code.
http://www.dostips.com/forum/viewtopic.php?f=3&t=6271
Quote from: miskox

What would be the best solution if I START the process before midnight and when time changes from 23:xx:xx to 00:xx:00 to have a CORRECT time difference? Maybe adding 24 to hours? Or maybe adding dates to start time and end time?

Saso
Quote from: dbenham
Yes, assuming your process takes less than 24 hours to complete, then all you need to do is conditionally at 24 hours if elapsed is less than 0.
Code: [Select]if %elapsed% lss 0 set /a elapsed+=24*60*60*100

Dave Benham


Discussion

No Comment Found