cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Busy looping bug in multi_socket interface

From: Yang Tse <yangsita_at_gmail.com>
Date: Thu, 1 May 2008 01:42:30 +0200

2008/4/30, Christopher Palow wrote:

> Why not just a struct timeval for the key? It's basically two longs.

Yes, we don't need K&R compatibility, C89 is enough!

#define compare(i,j)
(((i.tv_sec)==(j.tv_sec))?(i.tv_usec)-(j.tv_usec):(i.tv_sec)-(j.tv_sec))

-- 
-=[Yang]=-
Received on 2008-05-01