[compiler-rt] r360394 - [compiler-rt] Migrate to _zx_clock_get_new/_zx_clock_get_monotonic
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 16:42:58 PDT 2019
Author: phosek
Date: Thu May 9 16:42:58 2019
New Revision: 360394
URL: http://llvm.org/viewvc/llvm-project?rev=360394&view=rev
Log:
[compiler-rt] Migrate to _zx_clock_get_new/_zx_clock_get_monotonic
This is part of the soft-transition to the new _zx_clock_get signature.
Differential Revision: https://reviews.llvm.org/D61768
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc?rev=360394&r1=360393&r2=360394&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_fuchsia.cc Thu May 9 16:42:58 2019
@@ -46,9 +46,14 @@ unsigned int internal_sleep(unsigned int
return 0;
}
-u64 NanoTime() { return _zx_clock_get(ZX_CLOCK_UTC); }
+u64 NanoTime() {
+ zx_time_t time;
+ zx_status_t status = _zx_clock_get_new(ZX_CLOCK_UTC, &time);
+ CHECK_EQ(status, ZX_OK);
+ return time;
+}
-u64 MonotonicNanoTime() { return _zx_clock_get(ZX_CLOCK_MONOTONIC); }
+u64 MonotonicNanoTime() { return _zx_clock_get_monotonic(); }
uptr internal_getpid() {
zx_info_handle_basic_t info;
More information about the llvm-commits
mailing list