Measure Network Latency by Pinging Hosts
ICMP echo packets (or "ping") can be used as a measure of connection response time. PingTime can be used to track and diagnose potential network routing and performance issues.
ping = PingTime["wolfram.com"]
Convert the result to other units.
Use a series of pings over time to periodically test network conditions.
pings = PingTime["wolfram.com", 400]