From f26e290e33571b4fabfe71b96bf2987b8e85df98 Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Wed, 24 Oct 2018 15:15:36 -0700 Subject: [PATCH] fuchsia: Stub out timing and memory functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This functionality isn't (currently) available on Fuchsia from the OS. Bug: chromium:808287 Change-Id: If017bc762448c437b74cb03587ba35da5d131c75 Reviewed-on: https://webrtc-review.googlesource.com/c/107760 Reviewed-by: Patrik Höglund Commit-Queue: Scott Graham Cr-Commit-Position: refs/heads/master@{#25373} --- rtc_base/cpu_time.cc | 8 +++++++- rtc_base/memory_usage.cc | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rtc_base/cpu_time.cc b/rtc_base/cpu_time.cc index de4a6bd684..ad91ecace9 100644 --- a/rtc_base/cpu_time.cc +++ b/rtc_base/cpu_time.cc @@ -65,6 +65,9 @@ int64_t GetProcessCpuTimeNanos() { } else { RTC_LOG_ERR(LS_ERROR) << "GetProcessTimes() failed."; } +#elif defined(WEBRTC_FUCHSIA) + RTC_LOG_ERR(LS_ERROR) << "GetProcessCpuTimeNanos() not implemented"; + return 0; #else // Not implemented yet. static_assert( @@ -107,10 +110,13 @@ int64_t GetThreadCpuTimeNanos() { } else { RTC_LOG_ERR(LS_ERROR) << "GetThreadTimes() failed."; } +#elif defined(WEBRTC_FUCHSIA) + RTC_LOG_ERR(LS_ERROR) << "GetThreadCpuTimeNanos() not implemented"; + return 0; #else // Not implemented yet. static_assert( - false, "GetProcessCpuTimeNanos() platform support not yet implemented."); + false, "GetThreadCpuTimeNanos() platform support not yet implemented."); #endif return -1; } diff --git a/rtc_base/memory_usage.cc b/rtc_base/memory_usage.cc index a70c54753f..9cd36d3720 100644 --- a/rtc_base/memory_usage.cc +++ b/rtc_base/memory_usage.cc @@ -61,6 +61,9 @@ int64_t GetProcessResidentSizeBytes() { return -1; } return pmc.WorkingSetSize; +#elif defined(WEBRTC_FUCHSIA) + RTC_LOG_ERR(LS_ERROR) << "GetProcessResidentSizeBytes() not implemented"; + return 0; #else // Not implemented yet. static_assert(false,