2016-01-06 08:29:49 +11:00
|
|
|
local computer = {}
|
2016-01-07 02:58:05 +11:00
|
|
|
local api = {}
|
|
|
|
computer.api = api
|
2016-01-05 04:20:40 +11:00
|
|
|
|
2016-01-06 08:29:49 +11:00
|
|
|
function computer.prepare( ... )
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2016-01-07 02:58:05 +11:00
|
|
|
function api.pushSignal(...)
|
|
|
|
--FIXME: ASAP: Implement
|
|
|
|
end
|
|
|
|
|
2016-01-13 11:12:01 +11:00
|
|
|
function api.pullSignal(timeout)
|
|
|
|
if type(timeout) == "number" then
|
|
|
|
native.sleep(timeout * 1000000);
|
|
|
|
end
|
|
|
|
--print(debug.traceback())
|
|
|
|
end
|
|
|
|
|
|
|
|
function api.uptime()
|
|
|
|
return native.uptime()
|
|
|
|
end
|
|
|
|
|
2016-01-10 05:39:48 +11:00
|
|
|
function api.beep(freq, time)
|
2016-01-13 11:12:01 +11:00
|
|
|
if not freq then freq = 1000 end
|
|
|
|
if not time then time = 0.2 end
|
|
|
|
native.beep(freq, time * 1000)
|
2016-01-10 05:39:48 +11:00
|
|
|
end
|
|
|
|
|
2016-01-06 08:29:49 +11:00
|
|
|
return computer
|