[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [5.1.4] Most portable solution to "sleep"?
- From: Axel Kittenberger <axkibe@...>
- Date: Fri, 18 Feb 2011 14:48:04 +0100
The most portable system/kernel call would be select(0, NULL, NULL,
NULL, timeout); Most Systems support this. Currently this is neither
the way luaposix, nor socket.sleep does it.
But since you target for a Linux variant anyway, its likely fully
posix compatble, so why not use luaposix?
On Fri, Feb 18, 2011 at 2:29 PM, Gilles Ganault <firstname.lastname@example.org> wrote:
> On Fri, 18 Feb 2011 14:21:14 +0100, Michal Kolodziejczyk <email@example.com>
>>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).
> Cool, /bin/sleep is indeed available on the appliance. os.execute()
> works fine.
> Thank you.