| 123456789101112131415161718192021222324252627282930313233 |
- #include "../pch/pch.h"
- #include "CSystem.h"
- CSystem::CSystem()
- {
- }
- CSystem::~CSystem()
- {
- }
- int CSystem::get_CPU_core_num()
- {
- #ifdef _WIN32
- SYSTEM_INFO info;
- GetSystemInfo(&info);
- return info.dwNumberOfProcessors;
- #else
- return get_nprocs();
- #endif
- }
- void CSystem::my_sleep(int second)
- {
- #ifdef _WIN32
- Sleep(second * 1000);
- #else
- sleep(second);
- #endif
- }
|