aboutsummaryrefslogtreecommitdiff
path: root/src/timeout.c
diff options
context:
space:
mode:
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;