https://bugs.llvm.org/show_bug.cgi?id=44773

Louis Dionne <ldio...@apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
 Fixed By Commit(s)|                            |8bec8927134f116eb11ddea9db7
                   |                            |8b1a6241884c9
         Resolution|---                         |FIXED

--- Comment #2 from Louis Dionne <ldio...@apple.com> ---
This was fixed with

    commit 8bec8927134f116eb11ddea9db78b1a6241884c9
    Author: Louis Dionne <ldio...@apple.com>
    Date:   Mon Feb 10 18:30:43 2020 +0100

        [libc++][Apple] Use CLOCK_MONOTONIC_RAW instead of CLOCK_UPTIME_RAW for
steady_clock

        Summary:
        In D27429, we switched the Apple implementation of steady_clock::now()
        from clock_gettime(CLOCK_MONOTONIC) to clock_gettime(CLOCK_UPTIME_RAW).
        The purpose was to get nanosecond precision, and also to improve the
        performance of the implementation.

        However, it appears that CLOCK_UPTIME_RAW does not satisfy the
requirements
        of the Standard, since it is not strictly speaking monotonic. Indeed,
the
        clock does not increment while the system is asleep, which had been
        mentioned in D27429 but somehow not addressed.

        This patch switches to CLOCK_MONOTONIC_RAW, which is monotonic,
increased
        during sleep, and also has nanosecond precision.

        https://llvm.org/PR44773

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to