summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lua/libmana.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lua/libmana.lua b/scripts/lua/libmana.lua
index 7084216..62c089f 100644
--- a/scripts/lua/libmana.lua
+++ b/scripts/lua/libmana.lua
@@ -343,7 +343,8 @@ end
function check_schedule()
if #scheduler_jobs==0 then return end
- while os.time() > scheduler_jobs[#scheduler_jobs][0] do
+ local current_time = os.time()
+ while current_time > scheduler_jobs[#scheduler_jobs][0] do
-- retreive the job and remove it from the schedule
job = scheduler_jobs[#scheduler_jobs]
table.remove(scheduler_jobs)