MEDIUM: lua: change the timeout execution
Now, the Lua timeout is relative to the effective run time.
When the Lua is waiting for I/O, this time is not took in
lua run time account.
diff --git a/include/types/hlua.h b/include/types/hlua.h
index ac56c2a..48f7487 100644
--- a/include/types/hlua.h
+++ b/include/types/hlua.h
@@ -47,7 +47,9 @@
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 expire; /* Lua execution must be stopped over this time. */
+ unsigned int max_time; /* The max amount of execution time for an Lua process, in ms. */
+ unsigned int start_time; /* The ms time when the Lua starts the last execution. */
+ unsigned int run_time; /* Lua total execution time in ms. */
struct task *task; /* The task associated with the lua stack execution.
We must wake this task to continue the task execution */
struct list com; /* The list head of the signals attached to this task. */