From 802860a412eccdc7a4d2179dea221af9b63f95b3 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 28 Feb 2018 22:54:05 +0300 Subject: [PATCH] Fix CE. GitOrigin-RevId: c6ddbed7c3452c9a469160ae1cafc1fce5f9e750 --- tdutils/td/utils/port/Stat.cpp | 4 ++++ tdutils/td/utils/port/Stat.h | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tdutils/td/utils/port/Stat.cpp b/tdutils/td/utils/port/Stat.cpp index 28ef069e..eb6204bc 100644 --- a/tdutils/td/utils/port/Stat.cpp +++ b/tdutils/td/utils/port/Stat.cpp @@ -299,5 +299,9 @@ Result stat(CSlice path) { return fd.stat(); } +Result cpu_stat() { + return Status::Error("Not supported"); +} + } // namespace td #endif diff --git a/tdutils/td/utils/port/Stat.h b/tdutils/td/utils/port/Stat.h index e4cb7f9a..d0a98db1 100644 --- a/tdutils/td/utils/port/Stat.h +++ b/tdutils/td/utils/port/Stat.h @@ -24,6 +24,13 @@ struct Stat { Result stat(CSlice path) TD_WARN_UNUSED_RESULT; +struct CpuStat { + uint64 total_ticks{0}; + uint64 process_user_ticks{0}; + uint64 process_system_ticks{0}; +}; +Result cpu_stat() TD_WARN_UNUSED_RESULT; + #if TD_PORT_POSIX namespace detail { @@ -41,13 +48,6 @@ struct MemStat { Result mem_stat() TD_WARN_UNUSED_RESULT; -struct CpuStat { - uint64 total_ticks{0}; - uint64 process_user_ticks{0}; - uint64 process_system_ticks{0}; -}; -Result cpu_stat() TD_WARN_UNUSED_RESULT; - #endif } // namespace td