Sleep function lua

This article is tagged with: Sleep function lua and lua

sleep function lua

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

This article is tagged with: Sleep function lua and lua