On Mon, 12 May 2008, Yang Tse wrote:
>> Attached here is a first patch that introduces millisecond timeout
>> resolution in c-ares. I'm interested in feedback.
>
> The whole idea is excellent.
It has also in fact been proven to work in a customer installation (on Linux).
> To avoid problems on systems which have unsigned struct timeval members, in
> ares__timedout() it would be possible to simply do comparisons instead of
> substractions to get the function result. And it could even be a macro to
> get rid of the function calling overhead.
>
> Due to the now existing ares__tvnow() calls to gettimeofday() should be
> replaced by the former.
Yes, sounds like the proper thing to do!
> ares__timeoffset() return type should be long instead of int. But actually
> now that ares_tvdiff() exists probably one function or the other should be
> nuked, they differentiate in which argument is subtracted from the other.
> Not sure if its more confusing to have both functions or just one ;-)
We better change to make it be one single function.
> Maybe some int data type should be converted to long to avoid some warnings,
> autobuilds will show the real need.
long, or possibly time_t, but I think long is better in this case.
-- c-ares -- my preferred DNS asynch resolver libraryReceived on 2008-05-13