summaryrefslogtreecommitdiff
path: root/script/brave
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-09 17:35:14 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-09 17:35:14 +0800
commit62abe89c17393d58ec338952edad6062a8d32ad9 (patch)
tree57172ca22d0b7fe53498b0d86ccc107eac7fd365 /script/brave
parent8203564f88be814227d2ea88d67c0cbd97987f50 (diff)
downloadlua-language-server-62abe89c17393d58ec338952edad6062a8d32ad9.zip
timer waker
Diffstat (limited to 'script/brave')
-rw-r--r--script/brave/work.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/script/brave/work.lua b/script/brave/work.lua
index bc4447a1..907f78cf 100644
--- a/script/brave/work.lua
+++ b/script/brave/work.lua
@@ -18,6 +18,13 @@ brave.on('loadProto', function ()
end
end)
+brave.on('timer', function (time)
+ while true do
+ thread.sleep(time)
+ brave.push('wakeup')
+ end
+end)
+
brave.on('compile', function (text)
local state, err = parser:compile(text, 'lua', 'Lua 5.4')
if not state then