Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function status(msg)
- if gpu and screen then
- gpu.set(1, y, msg)
- if y == h then
- gpu.copy(1, 2, w, h - 1, 0, -1)
- gpu.fill(1, h, w, 1, " ")
- else
- y = y + 1
- end
- end
- -- boot can be slow in some environments, protect from timeouts
- if uptime() - last_sleep > 1 then
- local signal = table.pack(pull(0))
- -- there might not be any signal
- if signal.n > 0 then
- -- push the signal back in queue for the system to use it
- computer.pushSignal(table.unpack(signal, 1, signal.n))
- end
- last_sleep = uptime()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement