Introduction

simple lua sleep module written in C to pause for seconds, milliseconds or microseconds

Why?

how to sleep in lua is one of the most popular asked questions on lists.

How?

svn checkout http://svn.plentyfact.org/lua-sleep

or download from here:

http://projects.plentyfact.org/attachments/download/21/lua-sleep_0.1.tar.gz

run "make" ro get your lsleep.so , see test,lua for how to use it.

Use

lsleep = require 'lsleep'

print("we sleep 5 seconds")

lsleep.sleep(5)

print("we sleep 500 miliseconds")

lsleep.msleep(500)

print("we sleep 5000 microseconds")

lsleep.usleep(5000)

Public Domain

this is bluntly inspired by Daniel Aquino

( see http://lua-users.org/lists/lua-l/2010-10/msg00338.html )

this is really trivial and therefore i place this module in the public domain.