[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [5.1.4] Most portable solution to "sleep"?
- From: Michal Kolodziejczyk <miko@...>
- Date: Fri, 18 Feb 2011 14:21:14 +0100
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