-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
waittime is not deadtime #31
Comments
@ChristofKaufmann I had added note: I think |
OK, it is really called I tried the new version with this code: import time
import pingparsing
transmitter = pingparsing.PingTransmitter()
transmitter.destination_host = "2.3.4.5"
transmitter.count = 1
transmitter.timeout = 3000
start = time.time()
result = transmitter.ping()
stop = time.time()
ping_parser = pingparsing.PingParsing()
parsed = ping_parser.parse(result)
fstr = "time used: {} s, transmitted: {}, received: {}"
print(fstr.format(stop-start, parsed.packet_transmit, parsed.packet_receive)) and the result is:
So it works! Thanks! However, I find it confusing that |
Thank you for your confirmation and feedback.
I agree with you this would be confusing, but I think that specifying milliseconds timeouts with float in seconds would be a little bit pain. |
Sounds reasonable. Thanks for the discussion and implementation! |
Summerizing this answer deadtime (-w) waits for the whole application and waittime (-W) for an individual ping. However, there is an important difference, when combined with count (-c). Look at these examples, trying to ping a non-existing IP address, and compare the numbers of transmitted packets:
and
So in my application case I need the latter one. However, in pingparsing currently only the the first one (deadtime) is implemented, but this option is also called
waittime
(deprecated). I think both might be useful, depending on the application.The text was updated successfully, but these errors were encountered: