lua wait 30 sec code example
Example 1: sleep function lua
local clock = os.clock
function sleep(n) -- seconds
local t0 = clock()
while clock() - t0 <= n do end
end
Example 2: how to wait in lua
wait() --parameter is seconds
local clock = os.clock
function sleep(n) -- seconds
local t0 = clock()
while clock() - t0 <= n do end
end
wait() --parameter is seconds