mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2025-01-12 21:07:34 +01:00
Log if failed to get CPU statistics on supported platforms.
This commit is contained in:
parent
65bcaaa572
commit
01ee58bd27
@ -23,6 +23,9 @@ ServerCpuStat::ServerCpuStat() {
|
|||||||
void ServerCpuStat::update(double now) {
|
void ServerCpuStat::update(double now) {
|
||||||
auto r_cpu_stat = td::cpu_stat();
|
auto r_cpu_stat = td::cpu_stat();
|
||||||
if (r_cpu_stat.is_error()) {
|
if (r_cpu_stat.is_error()) {
|
||||||
|
if (r_cpu_stat.error().message() != "Not supported") {
|
||||||
|
LOG(ERROR) << "Failed to get CPU statistics: " << r_cpu_stat.error();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user