PingTime

PingTime[host]

gives the round-trip ping time for the specified network host.

PingTime[host,n]

gives a list of times for n successive pings.

Details and Options

  • PingTime[host] uses standard ICMP datagrams. The host may be specified as "hostname" or IPAddress["addr"].
  • Times are reported in milliseconds.
  • PingTime takes the following options:
  • UpdateInterval0time to wait between pings
    TimeConstraintAutomatictime to wait for a ping to return
  • Option settings t are interpreted as t seconds. Settings involving Quantity can also be used.
  • The setting UpdateInterval->t specifies that PingTime will wait for time t after a reply packet is received before sending out the next ping.
  • With the default set of TimeConstraint->Automatic, PingTime will use the operating system's default timeout.
  • If a ping times out, PingTime returns $TimedOut.
  • PingTime gives the ping time from the computer on which the kernel in which it is executed is running.
  • In some operating systems, specifications for TimeConstraint may not strictly be adhered to.

Examples

open allclose all

Basic Examples  (1)

Ping www.wolfram.com once:

In[1]:=
Click for copyable input
Out[1]=

Do so 10 times:

In[2]:=
Click for copyable input
Out[2]=

Scope  (2)

Options  (2)

Properties & Relations  (1)

See Also

URLResponseTime  IPAddress  HostLookup  AbsoluteTiming

Introduced in 2016
(11.0)