diff --git a/modules/base/header.lua b/modules/base/header.lua index 4ab148d..3bc8fbb 100644 --- a/modules/base/header.lua +++ b/modules/base/header.lua @@ -61,8 +61,10 @@ do -- so local works return eq[tT[cT].ep - 1] end end - function event.pull(t) -- return or wait for the next event, optionally with the first param matching t - while true do + function event.pull(t,time) -- return or wait for the next event, optionally with the first param matching t + time = time or math.huge + time = time + computer.uptime() + while computer.uptime() < time do local e = event.get() if e then if t then