Revision
16456
Author
anthm
Date
2010-01-21 22:04:34 -0600 (Thu, 21 Jan 2010)

Log Message

small tweak

Modified Paths

Diff

Modified: freeswitch/trunk/src/switch_time.c (16455 => 16456)


--- freeswitch/trunk/src/switch_time.c	2010-01-22 03:58:16 UTC (rev 16455)
+++ freeswitch/trunk/src/switch_time.c	2010-01-22 04:04:34 UTC (rev 16456)
@@ -207,7 +207,7 @@
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Test: %ld Average: %ld Step: %d\n", (long)val, (long)avg, step);
 
 		diff = abs((int)(want - avg));
-		if (diff > 2500) {
+		if (diff > 1500) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, 
 							  "Abnormally large timer gap %d detected!\n"
 							  "Do you have your kernel timer set to higher than 1 kHz? You may experience audio problems.\n", diff);
@@ -253,8 +253,10 @@
 	} else if (lastgood) {
 		OFFSET = (int)(want - lastgood);
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Timer offset of %d calculated (fallback)\n", OFFSET);
+		switch_time_set_cond_yield(SWITCH_TRUE);
 	} else {
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Timer offset of NOT calculated\n");
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Timer offset NOT calculated\n");
+		switch_time_set_cond_yield(SWITCH_TRUE);
 	}
 }