Repository navigation
Commit b33d50e
Sleep until a task timer is due before waking it
The Luau task scheduler slept once with setTimeout and then resumed the
earliest timer without checking the clock. Host timers can fire about a
millisecond early, so task.wait(0.03) could return 0.0299, which failed
the task library test on main's first CI run. The scheduler now sleeps
again until the timer's wake time has passed, so task.wait always
returns at least the time requested, as on Roblox.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent f149aaa commit b33d50e
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
964 | 964 | | |
965 | 965 | | |
966 | 966 | | |
| 967 | + | |
967 | 968 | | |
968 | | - | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
969 | 973 | | |
970 | 974 | | |
971 | 975 | | |
| |||
0 commit comments