summaryrefslogtreecommitdiff
path: root/script/brave
diff options
context:
space:
mode:
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