STINNER Victor <vstin...@python.org> added the comment:
> On macOS CLOCK_UPTIME_RAW is the same as mach_absolute_time (according to the > manpage). https://developer.apple.com/documentation/kernel/1462446-mach_absolute_time says: "mach_absolute_time: Returns current value of a clock that increments monotonically in tick units (starting at an arbitrary point), this clock does not increment while the system is asleep." "Discussion: Prefer to use the equivalent clock_gettime_nsec_np(CLOCK_UPTIME_RAW) in nanoseconds." where clock_gettime_nsec_np() is: "As a non-portable extension, the clock_gettime_nsec_np() function will return the clock value in 64-bit nanoseconds." It doesn't say anything about NTP, whereas CLOCK_MONOTONIC_RAW seems to a clock which is not adjusted by NTP: """ CLOCK_MONOTONIC_RAW clock that increments monotonically, tracking the time since an arbitrary point like CLOCK_MONOTONIC. How- ever, this clock is unaffected by frequency or time adjustments. It should not be compared to other system time sources. """ So right, it sounds like mach_absolute_time() returns *seconds*. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41303> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com