Skip to content
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

Set custom timeout or interval in milliseconds #34

Open
CriPstian opened this issue Jan 4, 2022 · 1 comment
Open

Set custom timeout or interval in milliseconds #34

CriPstian opened this issue Jan 4, 2022 · 1 comment

Comments

@CriPstian
Copy link

As mentioned in discussions of issue #25 (Setting timeout or interval lower than 1 second is not possible)

The timeval structure already allows specifying timeouts in both seconds and microseconds.

This means that if the default values of the timeout (PING_DEFAULT_TIMEOUT) or interval(PING_DEFAULT_INTERVAL) are overriden, they would not have any issue in running in another unit of time with some obvious code changes.

The downside is that it will not be backward compatible with whoever is already overriding the default values. This means that upgrading to the latest version with a default of 2 seconds of timeout, will be transformed in a default of 2 milliseconds of timeout.

Proposed solution is to bring another definition to switch between seconds and milliseconds with a default to seconds, to keep current functionality untouched.

@likwidchz
Copy link

Hi, is there an update to this? I have exactly the same issue. I'd like to specify a much shorter timeout value.
This particular library has it https://github.com/bluemurder/esp8266-ping which I believe this one for the ESP32 was built off it.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants