sleep function lua
snippet in lua

sleep function lua

user5349

local clock = os.clock
function sleep(n)  -- seconds
  local t0 = clock()
  while clock() - t0 <= n do end
end