Skip to content

Commit

Permalink
[compiler-rt] Migrate to _zx_clock_get_new/_zx_clock_get_monotonic
Browse files Browse the repository at this point in the history
This is part of the soft-transition to the new _zx_clock_get signature.

Differential Revision: https://reviews.llvm.org/D61768

llvm-svn: 360394
  • Loading branch information
petrhosek committed May 9, 2019
1 parent bd588df commit 4fa4df9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc
Expand Up @@ -46,9 +46,14 @@ unsigned int internal_sleep(unsigned int seconds) {
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;
Expand Down

0 comments on commit 4fa4df9

Please sign in to comment.