diff --git a/util/timer.lua b/util/timer.lua index 3061da725..642d6e360 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