diff options
Diffstat (limited to 'src/luaevent.c')
-rw-r--r-- | src/luaevent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luaevent.c b/src/luaevent.c index 596e4e1..8903af1 100644 --- a/src/luaevent.c +++ b/src/luaevent.c @@ -46,8 +46,8 @@ int getSocketFd(lua_State* L, int idx) { } void load_timeval(double time, struct timeval *tv) { - tv->sec = (int)time; - tv->usec = (time * 1000000) % 1000000; + tv->tv_sec = (int)time; + tv->tv_usec = (int)(time * 1000000) % 1000000; } /* sock, event, callback, timeout */ |