Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/workers/projectRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,12 @@ export const LUAU_TASK_BOOTSTRAP = `
end
if #timers == 0 then return end

-- Host timers can fire a little early, so sleep again until the timer is due.
local remaining = timers[1].wake - clock()
if remaining > 0 then sleep(remaining) end
while remaining > 0 do
sleep(remaining)
remaining = timers[1].wake - clock()
end
local due = popTimer()
resume(due.thread, due.args)
end
Expand Down
Loading