cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: granularity of data

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 12 Apr 2001 11:34:58 +0200 (MET DST)

On Thu, 12 Apr 2001, Reza Naima wrote:

> After doing some tests, it appears that curl (the command line tool)
> reports data at a granularity of 5ms intervals. Is there any way to
> increase this granularity?

For the platforms that have it, curl uses gettimeofday() to get time
information. For those that haven't, it uses time() if it isn't windows.

On the windows platform, curl uses GetLocalTime(). You didn't mention what
platform you're using, so I can't comment on your specific environment.

The actual granularity of the timers is left to the lower OS layer to
provide. The gettimeofday() struct indicates up to microsecond resolution,
while the GetLocalTime() struct has a millisecond field.

If the current resolution isn't good enough, you have to dig up a timer on
your platform that is better (with a higher granularity) than the one curl is
currently using.

If you happen to find one and make curl is it, feel free to provide us with a
patch.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-04-12