Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apple: use CLOCK_MONOTONIC_RAW for time tracking #601

Merged
merged 1 commit into from
Dec 29, 2023

Conversation

Chilledheart
Copy link
Owner

see https://www.manpagez.com/man/3/clock_gettime_nsec_np/ CLOCK_UPTIME_RAW is the same with mach_absolute_time(); but CLOCK_UPTIME_RAW does not increment while the system is asleep.

use CLOCK_MONOTONIC_RAW here for continuing to increment while the system is asleep

see https://www.manpagez.com/man/3/clock_gettime_nsec_np/
CLOCK_UPTIME_RAW is the same with mach_absolute_time();
but CLOCK_UPTIME_RAW does not increment while the system is asleep.

use CLOCK_MONOTONIC_RAW here for continuing to increment while the system is asleep
@Chilledheart Chilledheart merged commit 93d5a8d into develop Dec 29, 2023
55 of 57 checks passed
@Chilledheart Chilledheart deleted the apple_use_clock_monotonic_raw branch December 29, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant