lua-users home
lua-l archive

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


You'll need, for instance, LuaSocket.

local socket = require "socket"

socket.sleep(0.5) -- sleeps half a second


On Wed, Mar 13, 2013 at 10:48 PM, albert <albert_200200@126.com> wrote:
http://www.nessie.de/mroth/lua-sqlite3/documentation.html#ref20
-- Ten attempts are made to proceed, if the database is locked
function my_busy_handler(attempts_made)
  if attempts_made < 10 then
    return true
  else
    return false
  end
end

In the document, it said,"A busy handler could do some other work or wait a few milliseconds."
What's the code to wait a few milliseconds? Thanks in advance.