mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-17 04:06:59 +00:00
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:
parent
fa4a1c4317
commit
849822f64e
@ -166,10 +166,12 @@ switch_mutex_unlock(obj->flag_mutex);
|
|||||||
/*!
|
/*!
|
||||||
\brief Wait a desired number of microseconds and yield the CPU
|
\brief Wait a desired number of microseconds and yield the CPU
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_USLEEP
|
#if defined(HAVE_USLEEP)
|
||||||
#define switch_yield(ms) usleep(ms);
|
#define switch_yield(ms) usleep(ms);
|
||||||
|
#elif defined(WIN32)
|
||||||
|
#define switch_yield(ms) Sleep((DWORD)((ms) / 1000));
|
||||||
#else
|
#else
|
||||||
#define switch_yield(ms) apr_sleep((ms) * 10); //apr_thread_yield();
|
#define switch_yield(ms) apr_sleep(ms); //apr_thread_yield();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user