From 3b0f2489f65dbc2abb9bb368c6ba840e75f4e3b5 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 3 Jan 2023 18:27:56 +0000 Subject: [PATCH] Update 'controller/Scheduler.lua' --- controller/Scheduler.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controller/Scheduler.lua b/controller/Scheduler.lua index 403f1c0..a005072 100644 --- a/controller/Scheduler.lua +++ b/controller/Scheduler.lua @@ -8,6 +8,7 @@ end AddQueue(Main) local finish = false +local t1 = os.clock() while not finish do finish = true for i, co in pairs(Queue) do @@ -16,4 +17,8 @@ while not finish do finish = false end end + if os.clock() - t1 > 1 do + sleep(0) + t1 = os.clock() + end end \ No newline at end of file