Return to Snippet

Revision: 28084
at June 30, 2010 17:07 by simondiercks


Initial Code
@echo off
for /f "tokens=1-14 delims= " %%A in ('systeminfo ^| find "System Up Time"') do set /a secs1=86400*%%D+3600*%%F+60*%%H+%%J

rem nothing here

for /f "tokens=1-14 delims= " %%A in ('systeminfo ^| find "System Up Time"') do set /a secs2=86400*%%D+3600*%%F+60*%%H+%%J
set /a secs3=secs2-secs1
echo %secs3% seconds taken.
pause

Initial URL
http://www.computerhope.com/forum/index.php?PHPSESSID=19e483b837f84937b9041fc5560f2970&topic=63400.0;all

Initial Description

                                

Initial Title
batch file duration caluculation

Initial Tags
windows

Initial Language
Windows PowerShell