for /l %i in (0,0,1) do @cmd /c "echo.|set/p=%TIME:~0,8^%" >> log.txt & ping -n 1 google.com | find "TTL" >> log.txt & ping -n 2 localhost > nul