PS C:\Users\Family> Measure-Command { start-process ping -argumentlist 192.168.5.1 -wait}
Days : 0
Hours : 0
Minutes : 0
Seconds : 4
Milliseconds : 56
Ticks : 40561631
TotalDays : 4.69463321759259E-05
TotalHours : 0.00112671197222222
TotalMinutes : 0.0676027183333333
TotalSeconds : 4.0561631
TotalMilliseconds : 4056.1631
ping 命令的输出
Pinging 192.168.5.1 with 32 bytes of data:
Reply from 192.168.5.1: bytes=32 time<1ms TTL=64
Reply from 192.168.5.1: bytes=32 time<1ms TTL=64
Reply from 192.168.5.1: bytes=32 time<1ms TTL=64
Reply from 192.168.5.1: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.5.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
根据问题,尽管总往返时间应该是,但实际花费的时间要4 x 1ms + overhead of program execution
长得多。
即使您已收到响应,在显示每个 ping 结果之前是否存在超时?用户界面的延迟是否如此显著?还是有其他原因导致程序运行如此缓慢。
这是在 win10 64 位上。我相信一定有其他方法可以提供更快的响应时间。