GitOrigin-RevId: c6ddbed7c3452c9a469160ae1cafc1fce5f9e750
This commit is contained in:
levlam 2018-02-28 22:54:05 +03:00
parent 6c6544fd06
commit 802860a412
2 changed files with 11 additions and 7 deletions

View File

@ -299,5 +299,9 @@ Result<Stat> stat(CSlice path) {
return fd.stat();
}
Result<CpuStat> cpu_stat() {
return Status::Error("Not supported");
}
} // namespace td
#endif

View File

@ -24,6 +24,13 @@ struct Stat {
Result<Stat> stat(CSlice path) TD_WARN_UNUSED_RESULT;
struct CpuStat {
uint64 total_ticks{0};
uint64 process_user_ticks{0};
uint64 process_system_ticks{0};
};
Result<CpuStat> cpu_stat() TD_WARN_UNUSED_RESULT;
#if TD_PORT_POSIX
namespace detail {
@ -41,13 +48,6 @@ struct MemStat {
Result<MemStat> mem_stat() TD_WARN_UNUSED_RESULT;
struct CpuStat {
uint64 total_ticks{0};
uint64 process_user_ticks{0};
uint64 process_system_ticks{0};
};
Result<CpuStat> cpu_stat() TD_WARN_UNUSED_RESULT;
#endif
} // namespace td