add L16 def for 32ms and allow timer matrix to drop to 1ms to support nelly

This commit is contained in:
Anthony Minessale
2011-04-12 09:47:11 -05:00
parent 6ea214c180
commit 82e3d49fd2
3 changed files with 23 additions and 3 deletions

View File

@@ -502,8 +502,9 @@ static switch_status_t timer_init(switch_timer_t *timer)
private_info->roll = TIMER_MATRIX[timer->interval].roll;
private_info->ready = 1;
if (timer->interval > 0 && timer->interval < MS_PER_TICK) {
MS_PER_TICK = timer->interval;
if (timer->interval > 0 && (timer->interval < MS_PER_TICK || (timer->interval % 10) != 0)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Increasing global timer resolution to 1ms to handle interval %d\n", timer->interval);
MS_PER_TICK = 1;
switch_time_sync();
}