cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH 4/4] src/tool: allow timeouts to accept decimal values

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 6 May 2013 20:47:16 +0200

On Mon, May 06, 2013 at 02:19:51PM -0400, Dave Reisner wrote:
> 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.

curl attempts to avoid use of floating point operations internally,
with the notable exception of the progress callback. Floating point is
inefficient and causes bloated code on some of the platforms on which libcurl
runs, especially some of the embedded ones where size is an issue, so it's
something to keep in mind. But given that this patch only touches the front
end and is minimally invasive, I think it's a good idea.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-06