#pragma once #ifdef _WIN32 # include namespace portable { inline void sleep(unsigned milliseconds) { Sleep(milliseconds); } } #else # include namespace portable { inline void sleep(unsigned milliseconds) { usleep(milliseconds * 1000U); // takes microseconds } } #endif