aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/timer.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/timer.lua b/util/timer.lua
index 3061da72..642d6e36 100644
--- a/util/timer.lua
+++ b/util/timer.lua
@@ -32,7 +32,10 @@ if not event then
if delay >= current_time then
t_insert(new_data, {delay, func});
else
- func();
+ local r = func();
+ if r and type(r) == "number" then
+ return _add_task(r, func);
+ end
end
end