v0.2.0 - Added startup apps and an event handler process (unfinished)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
local event = {}
|
||||
|
||||
function event.pull(timeout, type)
|
||||
local startTime = computer.uptime()
|
||||
local args
|
||||
repeat
|
||||
for _, eventArgs in ipairs(_G.evmgr.eventQueue) do
|
||||
if eventArgs[1] >= startTime and (eventArgs[2] == type or not type) then
|
||||
args = eventArgs
|
||||
end
|
||||
end
|
||||
coroutine.yield()
|
||||
until args
|
||||
table.remove(args, 1)
|
||||
return args
|
||||
end
|
||||
return event
|
||||
@@ -4,7 +4,7 @@ local component
|
||||
if loadfile then
|
||||
component = loadfile("/halyde/lib/component.lua")(loadfile)
|
||||
else
|
||||
component = require("component")
|
||||
component = import("component")
|
||||
end
|
||||
|
||||
local filesystem = {}
|
||||
|
||||
Reference in New Issue
Block a user