I have a problem on my computer. From time to time, certain features stop working, for perhaps 1-5 minutes. Ping ceases to work when this occurs. So I thought I'd gather some stats about this issue via a batch file that would run ping perhaps 1000 times and echo the time when it started and then again when it stopped. This is the file:
echo off
set i=
FOR /L %%i IN (1,1,3) DO (
echo %time%
ping www.google.com
echo %time%
)
But what happens is the first time echoed is the same as the second time. WHy? Or is there a better way to do this?