Skip to content

Commit

Permalink
[osx] use CLOCK_REALTIME for init_timeout
Browse files Browse the repository at this point in the history
#1511 changed osx clocks to use CLOCK_MONOTONIC_RAW, but that is an issue for the timeout structure because pthread expects an absolute system time. This resulted in timed event calls returning instantly.
  • Loading branch information
connorjclark authored Sep 9, 2024
1 parent 793d2af commit 81b7197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unix/utime.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void _al_unix_init_timeout(ALLEGRO_TIMEOUT *timeout, double seconds)

ASSERT(ut);

_al_clock_gettime(CLOCK_ID, &now);
_al_clock_gettime(CLOCK_REALTIME, &now);

if (seconds <= 0.0) {
ut->abstime.tv_sec = now.tv_sec;
Expand Down

0 comments on commit 81b7197

Please sign in to comment.