-1 if the memory context is not used. */
int nargs; /* The number of arguments in the stack at the start of execution. */
unsigned int flags; /* The current execution flags. */
- int wake_time; /* The lua wants to be waked at this time, or before. */
+ int wake_time; /* The lua wants to be waked at this time, or before. (ticks) */
struct hlua_timer timer; /* lua multipurpose timer */
struct task *task; /* The task associated with the lua stack execution.
We must wake this task to continue the task execution */
/* This function just ensure that the yield will be always
* returned with a timeout and permit to set some flags
+ * <timeout> is a tick value
*/
__LJMP void hlua_yieldk(lua_State *L, int nresults, int ctx,
lua_KFunction k, int timeout, unsigned int flags)
__LJMP static int hlua_sleep(lua_State *L)
{
unsigned int delay;
- unsigned int wakeup_ms;
+ int wakeup_ms; // tick value
MAY_LJMP(check_args(L, 1, "sleep"));
__LJMP static int hlua_msleep(lua_State *L)
{
unsigned int delay;
- unsigned int wakeup_ms;
+ int wakeup_ms; // tick value
MAY_LJMP(check_args(L, 1, "msleep"));
{
struct hlua *hlua;
unsigned int delay;
- unsigned int wakeup_ms;
+ int wakeup_ms; // tick value
/* Get hlua struct, or NULL if we execute from main lua state */
hlua = hlua_gethlua(L);