Files
ppsspp/Common
Henrik RydgårdandClaude Opus 5.5 19b25a2e42 Common: Use CLOCK_UPTIME_RAW for the monotonic clock on Apple platforms
- Fixes #16823

CLOCK_UPTIME_RAW is mach_absolute_time() in nanoseconds (the same value, not
just the same rate). That's the clock MoltenVK reports VK_GOOGLE_display_timing
present times in, which time_now_raw() is meant to match. Apple's
CLOCK_MONOTONIC counts time asleep, unlike Linux's, so on a Mac that had
slept since boot, from_time_raw() of a present time was off by all of it.

It's also cheaper to read: ~19ns vs ~30ns on M1. mach_absolute_time() itself
is ~8ns, but returns ticks, and the timebase on Apple Silicon is 125/3.

Timing risk: time_now_d() no longer advances while the machine sleeps, so a
sleep/wake shows up as a small delta rather than a huge one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-19 14:17:52 +02:00
..
2026-10-19 12:48:12 +02:00
…
2025-08-31 13:37:43 +02:00
…
2026-10-17 14:49:24 +02:00
2026-01-30 14:10:32 +01:00
2026-03-30 11:34:19 -06:00
2026-08-24 09:30:44 +02:00
…
2026-05-16 10:40:08 +02:00
…