diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-09 17:35:14 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-09 17:35:14 +0800 |
commit | 62abe89c17393d58ec338952edad6062a8d32ad9 (patch) | |
tree | 57172ca22d0b7fe53498b0d86ccc107eac7fd365 /script/brave/work.lua | |
parent | 8203564f88be814227d2ea88d67c0cbd97987f50 (diff) | |
download | lua-language-server-62abe89c17393d58ec338952edad6062a8d32ad9.zip |
timer waker
Diffstat (limited to 'script/brave/work.lua')
-rw-r--r-- | script/brave/work.lua | 7 |
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 |