From: Anthony Minessale Date: Mon, 27 Dec 2010 21:35:10 +0000 (-0600) Subject: try to adjust the timer to be ok with the horrible 10000 microsecond kernel resolutio... X-Git-Tag: v1.2-rc1~223^2~2^2^2~43^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=903b2901dbd09e9ebbc6dffced4faa8cda166a11;p=thirdparty%2Ffreeswitch.git try to adjust the timer to be ok with the horrible 10000 microsecond kernel resolution on amazon ec3 but that doesn't mean it's not horribly wrong to run the kernel that slow --- diff --git a/src/switch_time.c b/src/switch_time.c index 8465e5dcc0..ad721bee08 100644 --- a/src/switch_time.c +++ b/src/switch_time.c @@ -213,9 +213,13 @@ SWITCH_DECLARE(void) switch_time_calibrate_clock(void) } if (res > 1500) { + STEP_MS = res / 1000; + STEP_MIC = res; + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Timer resolution of %ld microseconds detected!\n" - "Do you have your kernel timer frequency set to lower than 1,000Hz? You may experience audio problems.\n", ts.tv_nsec / 1000); + "Do you have your kernel timer frequency set to lower than 1,000Hz? " + "You may experience audio problems. Step MS %d\n", ts.tv_nsec / 1000, STEP_MS); do_sleep(5000000); switch_time_set_cond_yield(SWITCH_TRUE); return;