lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> I want to limit the scripts to execute only for a specified period of time.
> I.e. if the script executes for more than a second, lua should terminate it

Set hooks and test for the time inside the hook. Raise an error if the time
is up. If you're running Unix, you can set an alarm and inside the alarm
handler set a hook to terminate the Lua run. See lua.c and my lalarm.