Decrease log spam in case that per core cpu usage cannot be queried

This commit is contained in:
Megamouse 2022-03-18 00:16:31 +01:00
parent 7a86cffd0a
commit 539ac32806
2 changed files with 5 additions and 1 deletions

View file

@ -125,6 +125,11 @@ namespace utils
};
#ifdef _WIN32
if (!m_cpu_cores || !m_cpu_query)
{
perf_log.warning("Can not collect per core cpu usage: The required API is not initialized.");
return;
}
PDH_STATUS status = PdhCollectQueryData(m_cpu_query);
if (ERROR_SUCCESS != status)