cAudioSleep.cpp

00001 // Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
00002 // This file is part of the "cAudio Engine"
00003 // For conditions of distribution and use, see copyright notice in cAudio.h
00004 
00005 #include "../include/cAudioPlatform.h"
00006 
00007 #ifdef CAUDIO_PLATFORM_WIN
00008 #include <windows.h>    //Basic windows include for Sleep();
00009 #else
00010 #include <unistd.h>             //Assumed linux system, include for usleep()
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); //convert from milliseconds to microseconds
00025 #endif
00026 }
00027 
00028 };
 All Classes Namespaces Functions Variables Enumerations

Generated on Sat Feb 20 22:55:08 2010 for cAudio by  doxygen 1.6.2