cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Measure units in docs are missing

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 3 Apr 2007 00:01:48 +0200 (CEST)

On Mon, 2 Apr 2007, Francesco Montorsi wrote:

> BTW the docs say that "Use this function AFTER a performed transfer if you
> want to get transfer- oriented data." and in particular for
> CURLINFO_SPEED_DOWNLOAD it says "Pass a pointer to a double to receive the
> average download speed that curl measured for the COMPLETE download."
>
> so I wonder: what if from the curl_progress_callback() I need to get the
> average download speed registered so far?

I think you actually can use them at any time and that the phrasing there was
just a precaution that isn't really valid. But...

> In fact, I'm looking for a way to get (from the curl_progress_callback) also
> the elapsed time and the estimated remaining time...

... given that the progress callback gives you all the info you need to make
such estimates yourself, I've never considered them such a big deal to offer
while in transfer.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-04-03