mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-11 08:16:19 -04:00
fix os.sleep(0)
causing too long without yielding
This commit is contained in:
parent
a181c38991
commit
76d7abe74f
@ -143,7 +143,7 @@ function event.pullFiltered(...)
|
|||||||
local deadline = computer.uptime() + (seconds or math.huge)
|
local deadline = computer.uptime() + (seconds or math.huge)
|
||||||
repeat
|
repeat
|
||||||
local waitTime = deadline - computer.uptime()
|
local waitTime = deadline - computer.uptime()
|
||||||
if waitTime <= 0 then
|
if waitTime < 0 then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
local signal = table.pack(computer.pullSignal(waitTime))
|
local signal = table.pack(computer.pullSignal(waitTime))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user