cAudioSleep.cpp
00001
00002
00003
00004
00005 #include "../include/cAudioPlatform.h"
00006
00007 #ifdef CAUDIO_PLATFORM_WIN
00008 #include <windows.h>
00009 #else
00010 #include <unistd.h>
00011 #include <time.h>
00012 #endif //If you need to support another platform, simply add a define for it
00013
00014 #include "../include/cAudioSleep.h"
00015
00016 namespace cAudio
00017 {
00018
00019 void cAudioSleep(unsigned int ms)
00020 {
00021 #ifdef CAUDIO_PLATFORM_WIN
00022 Sleep(ms);
00023 #else
00024 usleep(ms*1000);
00025 #endif
00026 }
00027
00028 };