lua-users home
lua-l archive

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

Really?! There's no built-in sleep function?! Are you serious?!

That's totally awesome. I love it.

Phoenix Sol

On Wed, May 20, 2009 at 4:57 PM, Aaron Brown <> wrote:

>> How can I implement a function (or use if already has) to perform a
>> "sleep", to wait some (milli)seconds doing nothing.  Thanks.
> If you can use LuaSocket, then you could do:
> require "socket"
> socket.sleep(5) -- sleep for five seconds

If you're on a unix or another system that has a sleep command callable
from a shell, you can do:

 os.execute("sleep 5")


Hotmail® has a new way to see what's up with your friends.