mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +00:00
add core param for controling timer
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16093 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
59afe7d382
commit
8f05bb7939
@ -1942,6 +1942,7 @@ SWITCH_DECLARE(switch_bool_t) switch_check_network_list_ip_token(const char *ip_
|
||||
#define switch_check_network_list_ip(_ip_str, _list_name) switch_check_network_list_ip_token(_ip_str, _list_name, NULL)
|
||||
SWITCH_DECLARE(void) switch_time_set_monotonic(switch_bool_t enable);
|
||||
SWITCH_DECLARE(void) switch_time_set_nanosleep(switch_bool_t enable);
|
||||
SWITCH_DECLARE(void) switch_time_set_cond_yield(switch_bool_t enable);
|
||||
SWITCH_DECLARE(uint32_t) switch_core_min_dtmf_duration(uint32_t duration);
|
||||
SWITCH_DECLARE(uint32_t) switch_core_max_dtmf_duration(uint32_t duration);
|
||||
SWITCH_DECLARE(uint32_t) switch_core_default_dtmf_duration(uint32_t duration);
|
||||
|
@ -1413,6 +1413,8 @@ static void switch_load_core_config(const char *file)
|
||||
switch_time_set_monotonic(switch_true(var));
|
||||
} else if (!strcasecmp(var, "enable-clock-nanosleep")) {
|
||||
switch_time_set_nanosleep(switch_true(var));
|
||||
} else if (!strcasecmp(var, "enable-cond-yield")) {
|
||||
switch_time_set_cond_yield(switch_true(var));
|
||||
} else if (!strcasecmp(var, "max-sessions") && !zstr(val)) {
|
||||
switch_core_session_limit(atoi(val));
|
||||
} else if (!strcasecmp(var, "rtp-start-port") && !zstr(val)) {
|
||||
|
@ -168,6 +168,11 @@ SWITCH_DECLARE(void) switch_time_set_nanosleep(switch_bool_t enable)
|
||||
NANO = enable ? 1 : 0;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_time_set_cond_yield(switch_bool_t enable)
|
||||
{
|
||||
globals.use_cond_yield = enable ? 1 : 0;
|
||||
}
|
||||
|
||||
static switch_time_t time_now(int64_t offset)
|
||||
{
|
||||
switch_time_t now;
|
||||
|
Loading…
x
Reference in New Issue
Block a user