| 1234567891011121314151617181920212223242526272829303132 |
- #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
- }
|