| 114 | } |
| 115 | |
| 116 | bool SetCurrentThreadAffinity(size_t coreAffinity) { |
| 117 | DWORD_PTR ret = ::SetThreadAffinityMask(::GetCurrentThread(), 1ULL << coreAffinity); |
| 118 | return ret != 0; |
| 119 | } |
| 120 | |
| 121 | void SleepThread(int msDuration) { |
| 122 | ::Sleep(msDuration); |
no test coverage detected