From d8c04909fa50e87bba58311dd8feecaa94508f4b Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 30 Apr 2013 14:23:39 +0000 Subject: 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). --- src/tool_cfgable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tool_cfgable.h') diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h index e6611fca0..9a9b6d8d3 100644 --- a/src/tool_cfgable.h +++ b/src/tool_cfgable.h @@ -53,8 +53,8 @@ struct Configurable { char *postfields; curl_off_t postfieldsize; char *referer; - long timeout; - long connecttimeout; + double timeout; + double connecttimeout; long maxredirs; curl_off_t max_filesize; char *headerfile; -- cgit v1.2.3