equal
deleted
inserted
replaced
367 // build tv |
367 // build tv |
368 struct timeval tv = { tv_sec, 0 }; |
368 struct timeval tv = { tv_sec, 0 }; |
369 |
369 |
370 // schedule wakeup |
370 // schedule wakeup |
371 // use a pure-timeout event |
371 // use a pure-timeout event |
372 if (event_base_once(lua_nexus->nexus->ev_base, -1, 0, lua_nexus_sleep_wakeup, L, &tv)) |
372 if (event_base_once(lua_nexus->nexus->ev_base, -1, EV_TIMEOUT, lua_nexus_sleep_wakeup, L, &tv)) |
373 return luaL_error(L, "event_base_once"); |
373 return luaL_error(L, "event_base_once"); |
374 |
374 |
375 // yield |
375 // yield |
376 return lua_yield(L, 0); |
376 return lua_yield(L, 0); |
377 } |
377 } |