fix os.sleep(0) causing too long without yielding

This commit is contained in:
Ocawesome101 2025-05-31 17:02:22 -04:00 committed by GitHub
parent a181c38991
commit 76d7abe74f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,7 +143,7 @@ function event.pullFiltered(...)
local deadline = computer.uptime() + (seconds or math.huge)
repeat
local waitTime = deadline - computer.uptime()
if waitTime <= 0 then
if waitTime < 0 then
break
end
local signal = table.pack(computer.pullSignal(waitTime))