default timer to run slower and increase as needed, Run the timer at 20ms by default and drop down as needed unless you set 1m-timer=true which was previous default

This commit is contained in:
Anthony Minessale
2011-04-29 11:09:14 -05:00
parent 00b53a91ea
commit 16e3d1fa25
4 changed files with 41 additions and 22 deletions

View File

@@ -1419,7 +1419,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
runtime.tipping_point = 0;
runtime.timer_affinity = -1;
runtime.microseconds_per_tick = 20000;
switch_load_core_config("switch.conf");
switch_core_state_machine_init(runtime.memory_pool);
@@ -1689,6 +1690,8 @@ static void switch_load_core_config(const char *file)
switch_core_min_idle_cpu(atof(val));
} else if (!strcasecmp(var, "tipping-point") && !zstr(val)) {
runtime.tipping_point = atoi(val);
} else if (!strcasecmp(var, "1ms-timer") && switch_true(val)) {
runtime.microseconds_per_tick = 1000;
} else if (!strcasecmp(var, "timer-affinity") && !zstr(val)) {
if (!strcasecmp(val, "disabled")) {
runtime.timer_affinity = -1;