From 4118db5b2a07587067edbc13a163997977d24876 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 17 May 2019 12:53:02 -0700 Subject: [PATCH] [fuchsia] Update zx_clock_get callers Fuchsia is changing zx_clock_get to return a zx_status_t. This change prepares us for that change. --- fml/time/time_point.cc | 2 +- shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fml/time/time_point.cc b/fml/time/time_point.cc index d097338c359d4..ad1282879f91a 100644 --- a/fml/time/time_point.cc +++ b/fml/time/time_point.cc @@ -18,7 +18,7 @@ namespace fml { // static TimePoint TimePoint::Now() { - return TimePoint(zx_clock_get(ZX_CLOCK_MONOTONIC)); + return TimePoint(zx_clock_get_monotonic()); } #else diff --git a/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc b/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc index 34331b12ab820..37691ccff0a34 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc +++ b/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc @@ -476,7 +476,9 @@ Dart_Handle System::VmoMap(fml::RefPtr vmo) { } uint64_t System::ClockGet(uint32_t clock_id) { - return zx_clock_get(clock_id); + zx_time_t result = 0; + zx_clock_get_new(clock_id, &result); + return result; } // clang-format: off