mirror of
https://github.com/Kiritow/OpenComputerScripts.git
synced 2024-03-22 13:10:46 +08:00
15 lines
459 B
Lua
15 lines
459 B
Lua
require('libevent')
|
|
local component=require('component')
|
|
local event=require('event')
|
|
local computer=require('computer')
|
|
local gpu=component.gpu
|
|
|
|
print("TimerID is: ",
|
|
AddTimer(1,function()
|
|
local str=string.format("<<Listeners: %d RAM: %.1f%%>>",#event.handlers,100-computer.freeMemory()/computer.totalMemory()*100)
|
|
local w,h=gpu.getResolution()
|
|
local startat=w-str:len()
|
|
startat=startat>0 and startat or 1
|
|
gpu.set(startat,1,str)
|
|
end,-1)
|
|
) |