diff --git a/src/util/SystemInfo/SystemInfo.cpp b/src/util/SystemInfo/SystemInfo.cpp index fa7d8ecd..afda4e8b 100644 --- a/src/util/SystemInfo/SystemInfo.cpp +++ b/src/util/SystemInfo/SystemInfo.cpp @@ -18,6 +18,11 @@ double ProcessorTime::Compare(ProcessorTime &last, ProcessorTime &now) return (double)dwork / dtotal; } +uint32 GetProcessorCount() +{ + return std::thread::hardware_concurrency(); +} + void QueryProcTime(ProcessorTime &out) { uint64 now, user, kernel; diff --git a/src/util/SystemInfo/SystemInfoUnix.cpp b/src/util/SystemInfo/SystemInfoUnix.cpp index 3127e6a7..9e0d4fb0 100644 --- a/src/util/SystemInfo/SystemInfoUnix.cpp +++ b/src/util/SystemInfo/SystemInfoUnix.cpp @@ -7,11 +7,6 @@ #include -uint32 GetProcessorCount() -{ - return std::thread::hardware_concurrency(); -} - uint64 QueryRamUsage() { long page_size = sysconf(_SC_PAGESIZE); diff --git a/src/util/SystemInfo/SystemInfoWin.cpp b/src/util/SystemInfo/SystemInfoWin.cpp index f955d4af..a9e70045 100644 --- a/src/util/SystemInfo/SystemInfoWin.cpp +++ b/src/util/SystemInfo/SystemInfoWin.cpp @@ -6,13 +6,6 @@ #include #pragma comment(lib, "ntdll.lib") -uint32 GetProcessorCount() -{ - SYSTEM_INFO sys_info; - GetSystemInfo(&sys_info); - return sys_info.dwNumberOfProcessors; -} - uint64 QueryRamUsage() { PROCESS_MEMORY_COUNTERS pmc{};