diff options
Diffstat (limited to 'ping.go')
-rw-r--r-- | ping.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -7,6 +7,9 @@ import ( "strings" ) +// Ping sends one ICMP echo packet to the given IP and times how long +// it takes to get a response, in milleseconds. Returns -1 if no +// response is received. func Ping(ip net.IP) float64 { cmd := exec.Command("ping", "-n", // numeric |