mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-25 20:18:21 +01:00
nanosleep patch.
This commit is contained in:
parent
e27fa00e1c
commit
e4d4c828d9
3
FIX
3
FIX
@ -1 +1,2 @@
|
||||
filter.chain is coroutine-free
|
||||
gettime returns time since Unix Epoch 1/1/1970 (UTC)
|
||||
sleep is robust to interrupts
|
||||
|
1
TODO
1
TODO
@ -1,3 +1,4 @@
|
||||
fix manual for gettime and sleep
|
||||
use wim's filter.chain
|
||||
use mike's "don't set to blocking before closing unless needed" patch?
|
||||
take a look at DB's smtp patch (add "extra argument" table)
|
||||
|
@ -199,7 +199,10 @@ int tm_lua_sleep(lua_State *L)
|
||||
n -= t.tv_sec;
|
||||
t.tv_nsec = (int) (n * 1000000000);
|
||||
if (t.tv_nsec >= 1000000000) t.tv_nsec = 999999999;
|
||||
nanosleep(&t, &r);
|
||||
while (nanosleep(&t, &r) != 0) {
|
||||
t.tv_sec = r.tv_sec;
|
||||
t.tv_nsec = r.tv_nsec;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user