lua-users home
lua-l archive

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


On 18.02.2011 13:55, Gilles Ganault wrote:

> Since I cross-compile Lua on Ubuntu and run it on a uClinux appliance,
> I need a portable, compact solution to pause a script.
> 
> Which solution would you recommend? Compiling Lua with a POSIX
> library, such as luaposix? Using "socket.sleep(0.2)"? Other?

I would use socket.sleep() if you have it available (and probably you do).
The "most portable" from the POV of the lua code is
os.execute("/usr/bin/sleep 0.2"), but you need /usr/bin/sleep installed
on both systems (which you probably have).

Regards,
miko