[libcxx] Use Fuchsia-native monotonic clock for std::chrono::steady_clock
authorRoland McGrath <mcgrathr@google.com>
Tue, 4 Jan 2022 18:25:20 +0000 (10:25 -0800)
committerRoland McGrath <mcgrathr@google.com>
Mon, 10 Jan 2022 21:14:50 +0000 (13:14 -0800)
commitce167c6fb2ae67cffa6702b869762fb80b62d3bc
tree6fe5fc0747f9662fc4549615c5d7d3be372d63c0
parentc9f83a8af9dc6d4bd3e864ad5a8df1f441a4b6ef
[libcxx] Use Fuchsia-native monotonic clock for std::chrono::steady_clock

Use the zx_clock_get_monotonic system call directly rather than
going through the POSIX clock_gettime function.  The libc function
is a trivial wrapper around the system call, and is not a standard C
function.  Avoiding it reduces the Fuchsia libc ABI surface that
libc++ depends on.

Reviewed By: phosek, ldionne, #libc

Differential Revision: https://reviews.llvm.org/D116606
libcxx/src/chrono.cpp