|
|
@ -10,8 +10,9 @@ int64 io_timeouted() { |
|
|
|
if (ptr>=alen) ptr=0; |
|
|
|
e=array_get(&io_fds,sizeof(io_entry),ptr); |
|
|
|
if (!e) return -1; |
|
|
|
for (;ptr<alen; ++ptr,++e) |
|
|
|
if (e->inuse && taia_less(&e->timeout,&now)) |
|
|
|
for (;ptr<alen; ++ptr,++e) { |
|
|
|
if (e->inuse && e->timeout.sec.x && taia_less(&e->timeout,&now)) |
|
|
|
return ptr; |
|
|
|
} |
|
|
|
return -1; |
|
|
|
} |