src/tool: allow timeouts to accept decimal values
Implement wrappers around strtod to convert the user argument to a double with sane error checking. Use this to allow --max-time and --connect-timeout to accept decimal values instead of strictly integers. The manpage is updated to make mention of this feature and, additionally, forewarn that the actual timeout of the operation can vary in its precision (particularly as the value increases in its decimal precision).
This commit is contained in:
committed by
Daniel Stenberg
parent
c0a7a98aee
commit
d8c04909fa
@@ -33,6 +33,8 @@ void cleanarg(char *str);
|
||||
|
||||
ParameterError str2num(long *val, const char *str);
|
||||
ParameterError str2unum(long *val, const char *str);
|
||||
ParameterError str2double(double *val, const char *str);
|
||||
ParameterError str2udouble(double *val, const char *str);
|
||||
|
||||
long proto2num(struct Configurable *config, long *val, const char *str);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user