lua-users wiki: Sleep Function
A common need is to pause (sleep) a program for a certain number of seconds, preferably without busy waiting. This function to do this without busy waiting does not exist in ANSI C, so it does not exist in stock Lua. However, there are extension libraries...