Made things clearer, as per jgm's suggestion.

This commit is contained in:
Adam Harrison 2023-03-28 14:17:30 -04:00 committed by George Sokianos
parent b348acaa81
commit c8977ca62b
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())