Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sleep(t)
- local exitTime = computer.uptime() + (t or 0)
- local events = {}
- repeat
- local d = {computer.pullSignal(exitTime - computer.uptime())}
- if d[1] ~= nil then
- events[#events+1] = d
- end
- until computer.uptime() >= exitTime
- for i = 1, #events do
- computer.pushSignal(table.unpack(events[i]))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment