lua-users home
lua-l archive

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

--- In lua-l@y..., "davefowle" <davefowle@y...> wrote:
> Is there a safe way to shut down the LUA program after an arbitrary
> time interval?

I get the current time when I start the script running (lua_dofile, 
lua_dobuffer, etc.). Then I add a line hook and check the elapsed 
time. If the script runs for too long I call lua_error with an 
appropriate message which interrupts execution of the script.