#ifdef _WIN32 #include //Basic windows include for Sleep(); #else #include //Assumed linux system, include for usleep() #include #endif //If you need to support another platform, simply add a define for it #include "../include/cAudioSleep.h" namespace cAudio { void cAudioSleep(unsigned int ms) { #ifdef _WIN32 Sleep(ms); #else usleep(ms*1000); //convert from milliseconds to microseconds #endif } };