Posted 11 September 2016 - 05:13 AM
When I run this program, the computer appears to lock up. Ctrl + T and Enter both fail to end the program (ctrl + r works, though), and no text appears on the monitor.
monitor=peripheral.wrap("monitor_0")
monitor.setTextScale(5)
function diplayTime()
local timeRaw = 0
local timeSec = 0
local timeMin = 0
local timeHrr = 0
while true do
monitor.clear()
monitor.setCursorPos(1,4)
monitor.write(timeRaw)
os.sleep(1)
timeRaw = timeRaw + 1
end
end
function breakLoop()
while true do
local event, par1 = os.pullEvent("key")
if par1 == 28 then
print("Ending Program.")
break
end
end
end
parallel.waitForAny(displayTime,breakLoop)