mirror of /home/gitosis/repositories/libowfat.git
Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat
https://www.fefe.de/libowfat/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
378 B
17 lines
378 B
#include "io_internal.h" |
|
|
|
int64 io_timeouted() { |
|
tai6464 now; |
|
static long ptr; |
|
io_entry* e; |
|
long alen=array_length(&io_fds,sizeof(io_entry)); |
|
taia_now(&now); |
|
++ptr; |
|
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)) |
|
return ptr; |
|
return -1; |
|
}
|
|
|