Skip to content

Commit 98b5cff

Browse files
committed
Updates release notes for PR #3921
1 parent 74ff3ef commit 98b5cff

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.release-notes/clock_uptime_raw.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.release-notes/next-release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Fix underlying time source for Time.nanos() on macOS
2+
3+
Previously, we were using `mach_absolute_time` on macOS to get the number of ticks since boot, with the assumption that ticks increment at nanosecond intervals. However, as noted by [Apple](https://developer.apple.com/documentation/apple-silicon/addressing-architectural-differences-in-your-macos-code#Apply-Timebase-Information-to-Mach-Absolute-Time-Values), this assumption is flawed on Apple Silicon, and will also affect any binaries that were built on Intel, as the Rosetta 2 translator will not apply any time conversion.
4+
5+
The recommended replacement to `mach_absolute_time` is to use `clock_gettime_nsec_np` with a clock of type `CLOCK_UPTIME_RAW`.
6+

0 commit comments

Comments
 (0)