Commit 7d36961f authored by Fabrice de Gans-Riberi's avatar Fabrice de Gans-Riberi Committed by Commit Bot

Reland "[fuchsia] Replace zx_clock_get() with zx_clock_get_new()."

This is a reland of 748de1e5

Original change's description:
> [fuchsia] Replace zx_clock_get() with zx_clock_get_new().
>
> zx_clock_get() signature is being replaced to report errors.
> As part of a soft transition, zx_clock_get_new() is introduced with
> the final function signature.
>
> Bug: chromium:963956
> Change-Id: Ia6d0f4fc560bd9149683011099b064540b54edd6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1616545
> Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
> Reviewed-by: Wez <wez@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61591}

Bug: chromium:963956
Change-Id: I555df23d448fa246e4edec36b349a3c0aaad66ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1617805
Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
Reviewed-by: 's avatarWez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61714}
parent 5e043f27
...@@ -150,7 +150,12 @@ void OS::SignalCodeMovingGC() { ...@@ -150,7 +150,12 @@ void OS::SignalCodeMovingGC() {
int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) { int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) {
const auto kNanosPerMicrosecond = 1000ULL; const auto kNanosPerMicrosecond = 1000ULL;
const auto kMicrosPerSecond = 1000000ULL; const auto kMicrosPerSecond = 1000000ULL;
const zx_time_t nanos_since_thread_started = zx_clock_get(ZX_CLOCK_THREAD); zx_time_t nanos_since_thread_started;
zx_status_t status =
zx_clock_get_new(ZX_CLOCK_THREAD, &nanos_since_thread_started);
if (status != ZX_OK) {
return -1;
}
// First convert to microseconds, rounding up. // First convert to microseconds, rounding up.
const uint64_t micros_since_thread_started = const uint64_t micros_since_thread_started =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment