mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-23 09:20:23 +02:00
Final push for release...
This commit is contained in:
@ -74,7 +74,10 @@ int sock_select(int n, fd_set *rfds, fd_set *wfds, fd_set *efds, p_tm tm) {
|
||||
double t = tm_get(tm);
|
||||
tv.tv_sec = (int) t;
|
||||
tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6);
|
||||
return select(0, rfds, wfds, efds, t >= 0.0? &tv: NULL);
|
||||
if (n <= 0) {
|
||||
Sleep(1000*t);
|
||||
return 0;
|
||||
} else return select(0, rfds, wfds, efds, t >= 0.0? &tv: NULL);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*\
|
||||
|
Reference in New Issue
Block a user