add switch_yield for windows

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2729 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-09-17 22:40:19 +00:00
parent fa4a1c4317
commit 849822f64e

View File

@ -166,10 +166,12 @@ switch_mutex_unlock(obj->flag_mutex);
/*!
\brief Wait a desired number of microseconds and yield the CPU
*/
#ifdef HAVE_USLEEP
#if defined(HAVE_USLEEP)
#define switch_yield(ms) usleep(ms);
#elif defined(WIN32)
#define switch_yield(ms) Sleep((DWORD)((ms) / 1000));
#else
#define switch_yield(ms) apr_sleep((ms) * 10); //apr_thread_yield();
#define switch_yield(ms) apr_sleep(ms); //apr_thread_yield();
#endif
/*!