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.
As mentioned in discussions of issue #25 (Setting timeout or interval lower than 1 second is not possible)
The
timevalstructure 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.