Jump to content

Ping is slow when Host is offline


Recommended Posts

Even when you use the timeout parameter Ping() takes a minimum of ~500 ms on IP adresses without any device.

$iTimer = TimerInit()
For $iX = 1 To 10
    Ping("10.0.0.111", 100)
Next
ConsoleWrite(Round(TimerDiff($iTimer) / 10) & " ms average" & @LF)

471 ms average

Can anything be done to shorten this other than running multiple processes/threads?

Note that Windows own ping.exe is not any faster.

$iTimer = TimerInit()
For $iX = 1 To 10
RunWait("ping 10.0.0.111 -n 1 -w 100")
Next
ConsoleWrite(Round(TimerDiff($iTimer) / 10) & " ms average" & @LF)

454 ms average

Edited by AdmiralAlkex
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...