aboutsummaryrefslogtreecommitdiff
path: root/src/timeout.c
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-07-16 06:48:48 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-07-16 06:48:48 +0000
commite4e2223cff658a7016724a625ebbd3dacb92a8f9 (patch)
treeaac49c61149d30bf11219ab8d9989915bf7bee37 /src/timeout.c
parent9a79d500eb3e015f5bf579aab714916d49c1f289 (diff)
downloadluasocket-e4e2223cff658a7016724a625ebbd3dacb92a8f9.tar.gz
luasocket-e4e2223cff658a7016724a625ebbd3dacb92a8f9.tar.bz2
luasocket-e4e2223cff658a7016724a625ebbd3dacb92a8f9.zip
Fixed a bunch of stuff. Added mike's patches.
Diffstat (limited to 'src/timeout.c')
-rw-r--r--src/timeout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/timeout.c b/src/timeout.c
index 74ba968..66b98dd 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -192,7 +192,8 @@ int tm_lua_sleep(lua_State *L)
192 struct timespec t, r; 192 struct timespec t, r;
193 t.tv_sec = (int) n; 193 t.tv_sec = (int) n;
194 n -= t.tv_sec; 194 n -= t.tv_sec;
195 t.tv_nsec = (int) (n * 1000000000) % 1000000000; 195 t.tv_nsec = (int) (n * 1000000000);
196 if (t.tv_nsec >= 1000000000) t.tv_nsec = 999999999;
196 nanosleep(&t, &r); 197 nanosleep(&t, &r);
197#endif 198#endif
198 return 0; 199 return 0;