diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp --- a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp @@ -25,6 +25,7 @@ #include #include #include +#include namespace __sanitizer { @@ -47,8 +48,10 @@ } u64 NanoTime() { + zx_handle_t utc_clock = _zx_utc_reference_get(); + CHECK_NE(utc_clock, ZX_HANDLE_INVALID); zx_time_t time; - zx_status_t status = _zx_clock_get(ZX_CLOCK_UTC, &time); + zx_status_t status = _zx_clock_read(utc_clock, &time); CHECK_EQ(status, ZX_OK); return time; }