lua-users home
lua-l archive

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


If you are happy to recompile luaposix, it is trivial to copy the posix sleep() function and create a similar binding to posix usleep().

Perhaps a nicer solution would be to extend luaposix sleep to accept fractional values and call first posix sleep() for the integer part, then posix usleep() for the fractional part. However, you have to take care of how the new sleep function responds to signals.

Stephen Irona

On 16 August 2011 01:25, Igor Medeiros <igorosbergster@gmail.com> wrote:
Hi,

There is a library that provides a sleep function in milliseconds? I tried using the posix.sleep() function but it only wait seconds instead miliseconds.

Thanks.




--
Stephen Irons
Senior Designer
Tait Radio Communications
175 Roydvale Ave, Christchurch, New Zealand
DDI: +64 - 3 - 357-0713
www.taitworld.com
stephen.irons@taitradio.com
TAIT: THE RIGHT FIT
=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================