Parse ping result

Have a look at getRTT function here http://forum.mikrotik.com/t/script-implementing-active-congestion-control/115302/1