···431431432432 // Block here if the scheduled slot is not clear.
433433 while (mc->scheduled.active) {
434434+435435+ // Replace the scheduled frame if it's in the past.
436436+ uint64_t now_ns = os_monotonic_get_ns();
437437+ if (mc->scheduled.display_time_ns < now_ns) {
438438+ break;
439439+ }
440440+434441 os_mutex_unlock(&mc->slot_lock);
435442436443 os_nanosleep(U_TIME_1MS_IN_NS);