Get Time taken to ping -

time to ping

Snippet Code

Rate this page :
  [ 0 votes]

Returns the time taken to ping an IP or a hostname.

Public Shared Function GetPingMs(ByRef hostNameOrAddress As String) Dim ping As New System.Net.NetworkInformation.Ping Return ping.Send(hostNameOrAddress).RoundtripTime End Function ' call this function using (IP Address). GetPingMs("") ' call this function using (HostName). GetPingMs("")


Ask Questions

Ask Question