I am trying to get the total time to access a page and using this command:
curl -o NUL -s -w "%%{time_total}" http://stackoverflow.com
I am able to get the total time displayed in the command prompt.
However, now I would like to put this in a for loop like this:
echo off
SET /a i=0
:loop
IF %i%==10 GOTO END
echo Iteration %i%.
SET /a i=%i%+1
GOTO LOOP
:end
and sum up all the times I get, replacing echo Iteration %i%. with something like
set /a var = curl -o NUL -s -w "%%{time_total}" http://stackoverflow.com
set /a vartotal = var + vartotal
But of course this doesn't work, and I know its partially because the times returned are decimal and batch can't handle decimals. Also, the URL may have non-alphabetic charcters in it such as ?, =, and &. Please help