[Freeswitch-svn] [commit] r8269 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Tue May 6 09:58:37 EDT 2008


Author: anthm
Date: Tue May  6 09:58:36 2008
New Revision: 8269

Modified:
   freeswitch/trunk/src/switch_time.c

Log:
crank accuracy on windows sleep

Modified: freeswitch/trunk/src/switch_time.c
==============================================================================
--- freeswitch/trunk/src/switch_time.c	(original)
+++ freeswitch/trunk/src/switch_time.c	Tue May  6 09:58:36 2008
@@ -173,6 +173,9 @@
 	}
 
 	if ((private_info = switch_core_alloc(timer->memory_pool, sizeof(*private_info)))) {
+#if defined(WIN32)
+		timeBeginPeriod(1);
+#endif
 		switch_mutex_lock(globals.mutex);
 		TIMER_MATRIX[timer->interval].count++;
 		switch_mutex_unlock(globals.mutex);
@@ -454,6 +457,12 @@
 			switch_yield(10000);
 		}
 	}
+
+#if defined(WIN32)
+	timeEndPeriod(1);
+#endif
+
+
 	return SWITCH_STATUS_SUCCESS;
 }
 



More information about the Freeswitch-svn mailing list