From 3306fc99c1f923fec6c8c946e14c729116c36f2c Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Tue, 28 Mar 2023 14:17:30 -0400 Subject: [PATCH] Made things clearer, as per jgm's suggestion. --- data/core/init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/data/core/init.lua b/data/core/init.lua index 00322121..e11d2568 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -1396,11 +1396,10 @@ local run_threads = coroutine.wrap(function() else core.threads[k] = nil end - elseif wait then + else + wait = wait or 0 thread.wake = system.get_time() + wait minimal_time_to_wake = math.min(minimal_time_to_wake, wait) - else - minimal_time_to_wake = 0 end else minimal_time_to_wake = math.min(minimal_time_to_wake, thread.wake - system.get_time())