RTS API Documentation
1.10.11
|
#include <switch.h>
#include <stdio.h>
#include "private/switch_apr_pvt.h"
#include "private/switch_core_pvt.h"
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <assert.h>
Go to the source code of this file.
Data Structures | |
struct | timer_private |
struct | timer_matrix |
struct | switch_timezones_list_t |
struct | rule |
struct | ttinfo |
struct | lsinfo |
struct | state |
Macros | |
#define | DISABLE_1MS_COND |
#define | UINT32_MAX 0xffffffff |
#define | MAX_TICK UINT32_MAX - 1024 |
#define | MAX_ELEMENTS 3600 |
#define | IDLE_SPEED 100 |
#define | calc_step() if (step > 11) step -= 10; else if (step > 1) step-- |
#define | check_roll() |
#define | TRUE 1 |
#define | FALSE 0 |
#define | TZ_MAX_TIMES 370 |
#define | TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ |
#define | TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ |
#define | TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ |
#define | MY_TZNAME_MAX 255 |
#define | SECSPERMIN 60 |
#define | MINSPERHOUR 60 |
#define | HOURSPERDAY 24 |
#define | DAYSPERWEEK 7 |
#define | DAYSPERNYEAR 365 |
#define | DAYSPERLYEAR 366 |
#define | SECSPERHOUR (SECSPERMIN * MINSPERHOUR) |
#define | SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) |
#define | MONSPERYEAR 12 |
#define | JULIAN_DAY 0 /* Jn - Julian day */ |
#define | DAY_OF_YEAR 1 /* n - day of year */ |
#define | MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ |
#define | EPOCH_YEAR 1970 |
#define | EPOCH_WDAY TM_THURSDAY |
#define | TZDEFRULES "posixrules" |
#define | TZDEFRULESTRING ",M4.1.0,M10.5.0" |
#define | is_digit(c) ((unsigned)(c) - '0' <= 9) |
#define | BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) |
#define | isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) |
#define | INITIALIZE(x) |
#define | TM_SUNDAY 0 |
#define | TM_MONDAY 1 |
#define | TM_TUESDAY 2 |
#define | TM_WEDNESDAY 3 |
#define | TM_THURSDAY 4 |
#define | TM_FRIDAY 5 |
#define | TM_SATURDAY 6 |
#define | TM_JANUARY 0 |
#define | TM_FEBRUARY 1 |
#define | TM_MARCH 2 |
#define | TM_APRIL 3 |
#define | TM_MAY 4 |
#define | TM_JUNE 5 |
#define | TM_JULY 6 |
#define | TM_AUGUST 7 |
#define | TM_SEPTEMBER 8 |
#define | TM_OCTOBER 9 |
#define | TM_NOVEMBER 10 |
#define | TM_DECEMBER 11 |
#define | TM_YEAR_BASE 1900 |
#define | EPOCH_YEAR 1970 |
#define | EPOCH_WDAY TM_THURSDAY |
#define | CHARS_DEF BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt), (2 * (MY_TZNAME_MAX + 1))) |
#define | switch_assert(expr) assert(expr) |
#define | LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400) |
Typedefs | |
typedef struct timer_private | timer_private_t |
typedef struct timer_matrix | timer_matrix_t |
Functions | |
SWITCH_MODULE_LOAD_FUNCTION (softtimer_load) | |
SWITCH_MODULE_SHUTDOWN_FUNCTION (softtimer_shutdown) | |
SWITCH_MODULE_RUNTIME_FUNCTION (softtimer_runtime) | |
SWITCH_MODULE_DEFINITION (CORE_SOFTTIMER_MODULE, softtimer_load, softtimer_shutdown, softtimer_runtime) | |
static switch_time_t | time_now (int64_t offset) |
void | switch_os_yield (void) |
static void | do_sleep (switch_interval_time_t t) |
static switch_interval_time_t | average_time (switch_interval_time_t t, int reps) |
void | switch_time_calibrate_clock (void) |
switch_time_t | switch_micro_time_now (void) |
Get the current epoch time in microseconds. More... | |
switch_time_t | switch_mono_micro_time_now (void) |
time_t | switch_epoch_time_now (time_t *t) |
Get the current epoch time. More... | |
void | switch_time_set_monotonic (switch_bool_t enable) |
void | switch_time_set_use_system_time (switch_bool_t enable) |
void | switch_time_set_timerfd (int enable) |
void | switch_time_set_matrix (switch_bool_t enable) |
void | switch_time_set_nanosleep (switch_bool_t enable) |
void | switch_time_set_cond_yield (switch_bool_t enable) |
static switch_status_t | timer_generic_sync (switch_timer_t *timer) |
switch_time_t | switch_time_ref (void) |
void | switch_time_sync (void) |
void | switch_micro_sleep (switch_interval_time_t t) |
void | switch_sleep (switch_interval_time_t t) |
void | switch_cond_next (void) |
void | switch_cond_yield (switch_interval_time_t t) |
static switch_status_t | timer_init (switch_timer_t *timer) |
static switch_status_t | timer_step (switch_timer_t *timer) |
static switch_status_t | timer_sync (switch_timer_t *timer) |
static switch_status_t | timer_next (switch_timer_t *timer) |
static switch_status_t | timer_check (switch_timer_t *timer, switch_bool_t step) |
static switch_status_t | timer_destroy (switch_timer_t *timer) |
static void | win32_init_timers (void) |
static void | tm2switchtime (struct tm *tm, switch_time_exp_t *xt) |
const char * | switch_lookup_timezone (const char *tz_name) |
void | switch_load_timezones (switch_bool_t reload) |
static void | event_handler (switch_event_t *event) |
static void | tztime (const time_t *const timep, const char *tzstring, struct tm *const tmp) |
switch_status_t | switch_time_exp_tz_name (const char *tz, switch_time_exp_t *tm, switch_time_t thetime) |
switch_status_t | switch_strftime_tz (const char *tz, const char *format, char *date, size_t len, switch_time_t thetime) |
static const char * | getzname (register const char *strp) |
static const char * | getnum (register const char *strp, int *const nump, const int min, const int max) |
static const char * | getsecs (register const char *strp, long *const secsp) |
static const char * | getoffset (register const char *strp, long *const offsetp) |
static const char * | getrule (const char *strp, register struct rule *const rulep) |
static time_t | transtime (const time_t janfirst, const int year, register const struct rule *const rulep, const long offset) |
static int | tzparse (const char *name, register struct state *const sp, const int lastditch) |
static void | timesub (const time_t *const timep, const long offset, register const struct state *const sp, register struct tm *const tmp) |
Variables | |
static int | MONO = 0 |
static int | SYSTEM_TIME = 0 |
static int | TFD = 0 |
static int | NANO = 0 |
static int | OFFSET = 0 |
static int | COND = 1 |
static int | MATRIX = 1 |
static switch_memory_pool_t * | module_pool = NULL |
struct { | |
int32_t RUNNING | |
int32_t STARTED | |
int32_t use_cond_yield | |
switch_mutex_t * mutex | |
uint32_t timer_count | |
} | globals |
static timer_matrix_t | TIMER_MATRIX [MAX_ELEMENTS+1] |
static switch_time_t | last_time = 0 |
static switch_timezones_list_t | TIMEZONES_LIST = { 0 } |
static switch_event_node_t * | NODE = NULL |
static const char | gmt [] = "GMT" |
static const int | mon_lengths [2][MONSPERYEAR] |
static const int | year_lengths [2] |
Definition at line 1741 of file switch_time.c.
Definition at line 207 of file switch_time.c.
Referenced by switch_time_calibrate_clock().
#define CHARS_DEF BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt), (2 * (MY_TZNAME_MAX + 1))) |
Definition at line 1808 of file switch_time.c.
#define check_roll | ( | ) |
Definition at line 768 of file switch_time.c.
Referenced by timer_check(), timer_next(), and timer_step().
#define DAY_OF_YEAR 1 /* n - day of year */ |
Definition at line 1706 of file switch_time.c.
Referenced by getrule(), and transtime().
#define DAYSPERLYEAR 366 |
Definition at line 1700 of file switch_time.c.
Referenced by getrule().
#define DAYSPERNYEAR 365 |
Definition at line 1699 of file switch_time.c.
#define DAYSPERWEEK 7 |
Definition at line 1698 of file switch_time.c.
Referenced by getrule(), getsecs(), timesub(), and transtime().
#define DISABLE_1MS_COND |
Definition at line 44 of file switch_time.c.
#define EPOCH_WDAY TM_THURSDAY |
Definition at line 1799 of file switch_time.c.
Referenced by timesub().
#define EPOCH_WDAY TM_THURSDAY |
Definition at line 1799 of file switch_time.c.
#define EPOCH_YEAR 1970 |
Definition at line 1798 of file switch_time.c.
#define EPOCH_YEAR 1970 |
Definition at line 1798 of file switch_time.c.
#define FALSE 0 |
Definition at line 1646 of file switch_time.c.
#define HOURSPERDAY 24 |
Definition at line 1697 of file switch_time.c.
Referenced by getsecs().
#define IDLE_SPEED 100 |
Definition at line 54 of file switch_time.c.
#define INITIALIZE | ( | x | ) |
Definition at line 1770 of file switch_time.c.
Referenced by transtime(), and tzparse().
#define is_digit | ( | c | ) | ((unsigned)(c) - '0' <= 9) |
Definition at line 1739 of file switch_time.c.
Referenced by getnum(), getrule(), and getzname().
#define isleap | ( | y | ) | (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) |
Definition at line 1743 of file switch_time.c.
Referenced by timesub(), transtime(), and tzparse().
#define JULIAN_DAY 0 /* Jn - Julian day */ |
Definition at line 1705 of file switch_time.c.
Referenced by getrule(), and transtime().
#define LEAPS_THRU_END_OF | ( | y | ) | ((y) / 4 - (y) / 100 + (y) / 400) |
Referenced by timesub().
#define MAX_ELEMENTS 3600 |
Definition at line 53 of file switch_time.c.
Referenced by SWITCH_MODULE_RUNTIME_FUNCTION(), and timer_destroy().
#define MAX_TICK UINT32_MAX - 1024 |
Definition at line 51 of file switch_time.c.
Referenced by SWITCH_MODULE_RUNTIME_FUNCTION().
#define MINSPERHOUR 60 |
Definition at line 1696 of file switch_time.c.
Referenced by getsecs().
#define MONSPERYEAR 12 |
Definition at line 1703 of file switch_time.c.
Referenced by getrule().
#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ |
Definition at line 1707 of file switch_time.c.
Referenced by getrule(), and transtime().
#define MY_TZNAME_MAX 255 |
Definition at line 1691 of file switch_time.c.
#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) |
Definition at line 1702 of file switch_time.c.
Referenced by timesub(), transtime(), and tzparse().
#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) |
#define SECSPERMIN 60 |
Definition at line 1695 of file switch_time.c.
#define switch_assert | ( | expr | ) | assert(expr) |
Definition at line 2337 of file switch_time.c.
Referenced by timesub().
#define TM_APRIL 3 |
Definition at line 1786 of file switch_time.c.
#define TM_AUGUST 7 |
Definition at line 1790 of file switch_time.c.
#define TM_DECEMBER 11 |
Definition at line 1794 of file switch_time.c.
#define TM_FEBRUARY 1 |
Definition at line 1784 of file switch_time.c.
#define TM_FRIDAY 5 |
Definition at line 1780 of file switch_time.c.
#define TM_JANUARY 0 |
Definition at line 1783 of file switch_time.c.
#define TM_JULY 6 |
Definition at line 1789 of file switch_time.c.
#define TM_JUNE 5 |
Definition at line 1788 of file switch_time.c.
#define TM_MARCH 2 |
Definition at line 1785 of file switch_time.c.
#define TM_MAY 4 |
Definition at line 1787 of file switch_time.c.
#define TM_MONDAY 1 |
Definition at line 1776 of file switch_time.c.
#define TM_NOVEMBER 10 |
Definition at line 1793 of file switch_time.c.
#define TM_OCTOBER 9 |
Definition at line 1792 of file switch_time.c.
#define TM_SATURDAY 6 |
Definition at line 1781 of file switch_time.c.
#define TM_SEPTEMBER 8 |
Definition at line 1791 of file switch_time.c.
#define TM_SUNDAY 0 |
Definition at line 1775 of file switch_time.c.
#define TM_THURSDAY 4 |
Definition at line 1779 of file switch_time.c.
#define TM_TUESDAY 2 |
Definition at line 1777 of file switch_time.c.
#define TM_WEDNESDAY 3 |
Definition at line 1778 of file switch_time.c.
#define TM_YEAR_BASE 1900 |
Definition at line 1796 of file switch_time.c.
Referenced by timesub().
#define TRUE 1 |
Definition at line 1642 of file switch_time.c.
Referenced by tzparse().
#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ |
Definition at line 1678 of file switch_time.c.
#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ |
Definition at line 1683 of file switch_time.c.
#define TZ_MAX_TIMES 370 |
Definition at line 1658 of file switch_time.c.
Referenced by tzparse().
#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ |
Definition at line 1664 of file switch_time.c.
#define TZDEFRULES "posixrules" |
Definition at line 1724 of file switch_time.c.
#define TZDEFRULESTRING ",M4.1.0,M10.5.0" |
Definition at line 1735 of file switch_time.c.
#define UINT32_MAX 0xffffffff |
Definition at line 48 of file switch_time.c.
Referenced by timer_step().
typedef struct timer_matrix timer_matrix_t |
Definition at line 136 of file switch_time.c.
typedef struct timer_private timer_private_t |
Definition at line 126 of file switch_time.c.
|
static |
Definition at line 191 of file switch_time.c.
References do_sleep(), timer_private::start, and switch_time_ref().
Referenced by switch_time_calibrate_clock().
|
static |
Definition at line 151 of file switch_time.c.
Referenced by average_time(), switch_cond_next(), switch_cond_yield(), switch_micro_sleep(), SWITCH_MODULE_RUNTIME_FUNCTION(), SWITCH_MODULE_SHUTDOWN_FUNCTION(), switch_sleep(), switch_time_calibrate_clock(), timer_init(), and timer_next().
|
static |
Definition at line 1436 of file switch_time.c.
References globals, switch_load_timezones(), switch_mutex_lock(), switch_mutex_unlock(), and tztime().
Referenced by SWITCH_MODULE_LOAD_FUNCTION().
|
static |
Definition at line 1883 of file switch_time.c.
References is_digit.
Referenced by getrule(), and getsecs().
|
static |
Definition at line 1950 of file switch_time.c.
References getsecs().
Referenced by tzparse().
|
static |
Definition at line 1974 of file switch_time.c.
References DAY_OF_YEAR, DAYSPERLYEAR, DAYSPERNYEAR, DAYSPERWEEK, getnum(), getsecs(), is_digit, JULIAN_DAY, MONSPERYEAR, MONTH_NTH_DAY_OF_WEEK, rule::r_day, rule::r_mon, rule::r_time, rule::r_type, rule::r_week, and SECSPERHOUR.
Referenced by tzparse().
|
static |
Definition at line 1911 of file switch_time.c.
References DAYSPERWEEK, getnum(), HOURSPERDAY, MINSPERHOUR, SECSPERHOUR, and SECSPERMIN.
Referenced by getoffset(), and getrule().
|
static |
void switch_load_timezones | ( | switch_bool_t | reload | ) |
Definition at line 1394 of file switch_time.c.
References switch_timezones_list_t::hash, memset(), name, switch_xml::next, switch_timezones_list_t::pool, SWITCH_CHANNEL_LOG, switch_core_destroy_memory_pool, switch_core_hash_destroy(), switch_core_hash_init, switch_core_hash_insert, switch_core_new_memory_pool, switch_core_strdup, SWITCH_LOG_INFO, switch_log_printf(), switch_xml_attr(), switch_xml_child(), switch_xml_free(), switch_xml_open_cfg(), value, and zstr.
Referenced by event_handler(), and SWITCH_MODULE_LOAD_FUNCTION().
SWITCH_MODULE_DEFINITION | ( | CORE_SOFTTIMER_MODULE | , |
softtimer_load | , | ||
softtimer_shutdown | , | ||
softtimer_runtime | |||
) |
SWITCH_MODULE_LOAD_FUNCTION | ( | softtimer_load | ) |
Definition at line 1511 of file switch_time.c.
References event_handler(), globals, switch_runtime::initiated, switch_timer_interface::interface_name, memset(), module_pool, MONO, pool, runtime, SCF_CALIBRATE_CLOCK, SCF_USE_CLOCK_RT, SCF_USE_HEAVY_TIMING, SCF_USE_WIN32_MONOTONIC, SWITCH_CHANNEL_LOG, switch_clear_flag, switch_event_bind_removable(), SWITCH_EVENT_RELOADXML, SWITCH_FALSE, switch_load_timezones(), switch_loadable_module_create_interface(), switch_loadable_module_create_module_interface(), SWITCH_LOG_CONSOLE, SWITCH_LOG_ERROR, SWITCH_LOG_NOTICE, switch_log_printf(), switch_mono_micro_time_now(), switch_mutex_init(), SWITCH_MUTEX_NESTED, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_time_calibrate_clock(), switch_time_set_cond_yield(), switch_time_set_nanosleep(), SWITCH_TIMER_INTERFACE, TFD, switch_timer_interface::timer_check, timer_check(), switch_timer_interface::timer_destroy, timer_destroy(), switch_timer_interface::timer_init, timer_init(), switch_timer_interface::timer_next, timer_next(), switch_timer_interface::timer_step, timer_step(), switch_timer_interface::timer_sync, timer_sync(), and win32_init_timers().
SWITCH_MODULE_RUNTIME_FUNCTION | ( | softtimer_runtime | ) |
Definition at line 1038 of file switch_time.c.
References COND, count, do_sleep(), globals, switch_runtime::initiated, MATRIX, MAX_ELEMENTS, MAX_TICK, switch_runtime::microseconds_per_tick, module_pool, MONO, mutex, NANO, switch_runtime::offset, switch_runtime::profile_time, switch_runtime::profile_timer, switch_runtime::reference, timer_matrix::roll, runtime, switch_session_manager::session_count, switch_runtime::session_hash_mutex, session_manager, switch_runtime::sessions_peak_fivemin, switch_runtime::sps, switch_runtime::sps_last, switch_runtime::sps_peak, switch_runtime::sps_peak_fivemin, switch_runtime::sps_total, SWITCH_CHANNEL_LOG, switch_core_thread_set_cpu_affinity(), switch_delete_profile_timer(), switch_get_system_idle_time(), SWITCH_LOG_CONSOLE, SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, switch_log_printf(), switch_mono_micro_time_now(), switch_mutex_init(), switch_mutex_lock(), SWITCH_MUTEX_NESTED, switch_mutex_trylock(), switch_mutex_unlock(), switch_new_profile_timer(), switch_os_yield(), SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TERM, switch_thread_cond_broadcast(), switch_thread_cond_create(), switch_time_now(), switch_time_ref(), switch_time_sync(), TFD, switch_runtime::throttle_mutex, timer_matrix::tick, time_now(), switch_runtime::time_sync, switch_runtime::timer_affinity, switch_runtime::timestamp, switch_runtime::tipping_point, and win32_init_timers().
SWITCH_MODULE_SHUTDOWN_FUNCTION | ( | softtimer_shutdown | ) |
Definition at line 1583 of file switch_time.c.
References do_sleep(), globals, switch_timezones_list_t::hash, switch_timezones_list_t::pool, switch_core_destroy_memory_pool, switch_core_hash_destroy(), switch_event_unbind(), switch_mutex_lock(), switch_mutex_unlock(), and SWITCH_STATUS_SUCCESS.
void switch_os_yield | ( | void | ) |
Definition at line 142 of file switch_time.c.
Referenced by switch_cond_next(), switch_core_session_read_frame(), switch_event_channel_deliver_thread(), switch_event_dispatch_thread(), SWITCH_MODULE_RUNTIME_FUNCTION(), and timer_next().
|
static |
Definition at line 540 of file switch_time.c.
References count, MONO, and switch_time_now().
Referenced by SWITCH_MODULE_RUNTIME_FUNCTION(), switch_mono_micro_time_now(), switch_time_ref(), switch_time_sync(), switch_xml_locate_user_cache(), and switch_xml_locate_user_merged().
|
static |
Definition at line 903 of file switch_time.c.
References check_roll, switch_timer::diff, globals, switch_timer::interval, switch_timer::private_info, timer_private::ready, timer_private::reference, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, TFD, timer_matrix::tick, switch_timer::tick, and timer_step().
Referenced by rtp_common_read(), and SWITCH_MODULE_LOAD_FUNCTION().
|
static |
Definition at line 944 of file switch_time.c.
References timer_matrix::count, globals, switch_timer::interval, MAX_ELEMENTS, switch_timer::private_info, timer_private::ready, runtime, SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, TFD, timer_matrix::tick, and switch_runtime::tipping_point.
Referenced by SWITCH_MODULE_LOAD_FUNCTION().
|
static |
Definition at line 382 of file switch_time.c.
References switch_timer::diff, switch_timer::interval, switch_timer::last_samplecount, switch_timer::memory_pool, switch_timer::private_info, switch_timer::samplecount, switch_timer::samples, switch_timer::start, SWITCH_CHANNEL_LOG, switch_core_alloc, SWITCH_LOG_DEBUG1, switch_log_printf(), switch_micro_time_now(), SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, and switch_timer::tick.
Referenced by timer_sync().
|
static |
Definition at line 699 of file switch_time.c.
References timer_matrix::cond, timer_matrix::count, do_sleep(), globals, if(), switch_timer::interval, switch_timer::memory_pool, switch_runtime::microseconds_per_tick, module_pool, timer_matrix::mutex, switch_timer::private_info, timer_private::ready, timer_private::reference, timer_private::roll, timer_matrix::roll, runtime, timer_private::start, switch_timer::start, SWITCH_CHANNEL_LOG, switch_core_alloc, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_LOG_WARNING, switch_micro_time_now(), switch_mutex_init(), switch_mutex_lock(), SWITCH_MUTEX_NESTED, switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_MEMERR, SWITCH_STATUS_SUCCESS, switch_thread_cond_create(), switch_time_sync(), TFD, timer_matrix::tick, and switch_runtime::tipping_point.
Referenced by SWITCH_MODULE_LOAD_FUNCTION().
|
static |
Definition at line 840 of file switch_time.c.
References check_roll, do_sleep(), globals, switch_timer::interval, MATRIX, mutex, switch_timer::private_info, timer_private::ready, timer_private::reference, runtime, switch_mutex_lock(), switch_mutex_unlock(), switch_os_yield(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_thread_cond_wait(), TFD, timer_matrix::tick, switch_timer::tick, timer_step(), and switch_runtime::tipping_point.
Referenced by SWITCH_MODULE_LOAD_FUNCTION().
|
static |
Definition at line 775 of file switch_time.c.
References check_roll, globals, switch_timer::interval, switch_timer::private_info, timer_private::ready, timer_private::reference, switch_timer::samplecount, switch_timer::samples, timer_private::start, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, TFD, and UINT32_MAX.
Referenced by SWITCH_MODULE_LOAD_FUNCTION(), timer_check(), timer_next(), and timer_sync().
|
static |
Definition at line 810 of file switch_time.c.
References globals, switch_timer::interval, switch_timer::private_info, timer_private::ready, timer_private::reference, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, TFD, timer_matrix::tick, switch_timer::tick, timer_generic_sync(), and timer_step().
Referenced by SWITCH_MODULE_LOAD_FUNCTION().
|
static |
Definition at line 2340 of file switch_time.c.
References DAYSPERNYEAR, DAYSPERWEEK, EPOCH_WDAY, EPOCH_YEAR, ip, isleap, state::leapcnt, LEAPS_THRU_END_OF, lsinfo::ls_corr, lsinfo::ls_trans, state::lsis, mon_lengths, SECSPERDAY, SECSPERHOUR, SECSPERMIN, switch_assert, TM_YEAR_BASE, while(), and year_lengths.
Referenced by tztime().
|
static |
Definition at line 1342 of file switch_time.c.
References memset(), switch_time_exp_t::tm_gmtoff, switch_time_exp_t::tm_hour, switch_time_exp_t::tm_isdst, switch_time_exp_t::tm_mday, switch_time_exp_t::tm_min, switch_time_exp_t::tm_mon, switch_time_exp_t::tm_sec, switch_time_exp_t::tm_wday, switch_time_exp_t::tm_yday, and switch_time_exp_t::tm_year.
Referenced by switch_strftime_tz(), and switch_time_exp_tz_name().
|
static |
Definition at line 2028 of file switch_time.c.
References DAY_OF_YEAR, DAYSPERWEEK, INITIALIZE, isleap, JULIAN_DAY, mon_lengths, MONTH_NTH_DAY_OF_WEEK, rule::r_day, rule::r_mon, rule::r_time, rule::r_type, rule::r_week, SECSPERDAY, and value.
Referenced by tzparse().
|
static |
Definition at line 2118 of file switch_time.c.
References state::ats, state::charcnt, state::chars, EPOCH_YEAR, FALSE, getoffset(), getrule(), getzname(), if(), INITIALIZE, isleap, state::leapcnt, name, SECSPERDAY, SECSPERHOUR, state::timecnt, transtime(), TRUE, ttinfo::tt_abbrind, ttinfo::tt_gmtoff, ttinfo::tt_isdst, ttinfo::tt_ttisgmt, ttinfo::tt_ttisstd, state::ttis, state::typecnt, state::types, TZ_MAX_TIMES, and year_lengths.
Referenced by tztime().
|
static |
Definition at line 2446 of file switch_time.c.
References state::ats, state::chars, FALSE, gmt, memset(), state::timecnt, timesub(), ttinfo::tt_abbrind, ttinfo::tt_gmtoff, ttinfo::tt_isdst, state::ttis, state::typecnt, state::types, and tzparse().
Referenced by event_handler(), switch_strftime_tz(), and switch_time_exp_tz_name().
|
static |
Definition at line 989 of file switch_time.c.
References count.
Referenced by SWITCH_MODULE_LOAD_FUNCTION(), and SWITCH_MODULE_RUNTIME_FUNCTION().
|
static |
Definition at line 87 of file switch_time.c.
Referenced by SWITCH_MODULE_RUNTIME_FUNCTION(), and switch_time_set_cond_yield().
struct { ... } globals |
Referenced by event_handler(), switch_cond_next(), switch_cond_yield(), switch_micro_time_now(), SWITCH_MODULE_LOAD_FUNCTION(), SWITCH_MODULE_RUNTIME_FUNCTION(), SWITCH_MODULE_SHUTDOWN_FUNCTION(), switch_sleep(), timer_check(), timer_destroy(), timer_init(), timer_next(), timer_step(), and timer_sync().
|
static |
Definition at line 1806 of file switch_time.c.
Referenced by tztime().
|
static |
Definition at line 607 of file switch_time.c.
Referenced by switch_time_sync().
|
static |
Definition at line 89 of file switch_time.c.
Referenced by SWITCH_MODULE_RUNTIME_FUNCTION(), switch_time_set_cond_yield(), switch_time_set_matrix(), and timer_next().
|
static |
Definition at line 100 of file switch_time.c.
Referenced by SWITCH_MODULE_LOAD_FUNCTION(), SWITCH_MODULE_RUNTIME_FUNCTION(), and timer_init().
|
static |
Definition at line 1845 of file switch_time.c.
Referenced by timesub(), and transtime().
|
static |
Definition at line 64 of file switch_time.c.
Referenced by SWITCH_MODULE_LOAD_FUNCTION(), SWITCH_MODULE_RUNTIME_FUNCTION(), switch_time_set_monotonic(), and time_now().
switch_mutex_t* mutex |
Definition at line 106 of file switch_time.c.
Referenced by switch_cond_next(), switch_cond_yield(), SWITCH_MODULE_RUNTIME_FUNCTION(), and timer_next().
|
static |
Definition at line 82 of file switch_time.c.
Referenced by do_sleep(), SWITCH_MODULE_RUNTIME_FUNCTION(), and switch_time_set_nanosleep().
|
static |
Definition at line 1377 of file switch_time.c.
|
static |
Definition at line 85 of file switch_time.c.
Referenced by do_sleep(), and switch_time_calibrate_clock().
int32_t RUNNING |
Definition at line 103 of file switch_time.c.
int32_t STARTED |
Definition at line 104 of file switch_time.c.
|
static |
Definition at line 68 of file switch_time.c.
Referenced by switch_time_ref(), switch_time_set_use_system_time(), and switch_time_sync().
|
static |
Definition at line 81 of file switch_time.c.
Referenced by SWITCH_MODULE_LOAD_FUNCTION(), SWITCH_MODULE_RUNTIME_FUNCTION(), switch_time_set_timerfd(), timer_check(), timer_destroy(), timer_init(), timer_next(), timer_step(), and timer_sync().
uint32_t timer_count |
Definition at line 107 of file switch_time.c.
|
static |
Definition at line 138 of file switch_time.c.
|
static |
Definition at line 1376 of file switch_time.c.
int32_t use_cond_yield |
Definition at line 105 of file switch_time.c.
|
static |
Definition at line 1850 of file switch_time.c.