Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

Fix order for converting mach absolute time #29

Merged
merged 1 commit into from
Jan 8, 2021
Merged

Conversation

k7z45
Copy link
Contributor

@k7z45 k7z45 commented Jan 7, 2021

The numer and denum [1] on regular mac are both 1 and numer and denum on
arm64 are 125 and 3. monotonic.py seem to have the order backwards
for converting mach absolute time to nanoseconds according to [2].

[1] https://opensource.apple.com/source/xnu/xnu-792/osfmk/mach/mach_time.h.auto.html
[2] https://developer.apple.com/documentation/apple_silicon/addressing_architectural_differences_in_your_macos_code

The numer and denum [1] on regular mac are both 1 and numer and denum on
arm64 are 125 and 3. monotonic.py seem to have the order backwards
for converting mach absolute time to nanoseconds according to [2].

[1] https://opensource.apple.com/source/xnu/xnu-792/osfmk/mach/mach_time.h.auto.html
[2] https://developer.apple.com/documentation/apple_silicon/addressing_architectural_differences_in_your_macos_code
@atdt atdt merged commit 58160d0 into atdt:master Jan 8, 2021
@atdt
Copy link
Owner

atdt commented Jan 8, 2021

Many thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants