Made things clearer, as per jgm's suggestion.

This commit is contained in:
Adam Harrison 2023-03-28 14:17:30 -04:00
parent 2cae7c51a5
commit 3306fc99c1
1 changed files with 2 additions and 3 deletions

View File

@ -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())