[Freeswitch-svn] [commit] r2729 - freeswitch/trunk/src/include
Freeswitch SVN
mikej at freeswitch.org
Sun Sep 17 18:40:19 EDT 2006
Author: mikej
Date: Sun Sep 17 18:40:19 2006
New Revision: 2729
Modified:
freeswitch/trunk/src/include/switch_utils.h
Log:
add switch_yield for windows
Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h (original)
+++ freeswitch/trunk/src/include/switch_utils.h Sun Sep 17 18:40:19 2006
@@ -166,10 +166,12 @@
/*!
\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
/*!
More information about the Freeswitch-svn
mailing list