提交 849822f6 authored 作者: Michael Jerris's avatar Michael Jerris

add switch_yield for windows

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2729 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 fa4a1c43
......@@ -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
/*!
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论