RTS API Documentation
1.10.11
|
Data Structures | |
struct | switch_time_exp_t |
Typedefs | |
typedef int64_t | switch_time_t |
typedef int64_t | switch_interval_time_t |
typedef struct switch_time_exp_t | switch_time_exp_t |
Functions | |
switch_time_t | switch_time_make (switch_time_t sec, int32_t usec) |
switch_time_t | switch_time_now (void) |
switch_status_t | switch_time_exp_gmt_get (switch_time_t *result, switch_time_exp_t *input) |
switch_status_t | switch_strftime (char *s, switch_size_t *retsize, switch_size_t max, const char *format, switch_time_exp_t *tm) |
switch_status_t | switch_strftime_nocheck (char *s, switch_size_t *retsize, switch_size_t max, const char *format, switch_time_exp_t *tm) |
switch_status_t | switch_rfc822_date (char *date_str, switch_time_t t) |
switch_status_t | switch_time_exp_gmt (switch_time_exp_t *result, switch_time_t input) |
switch_status_t | switch_time_exp_get (switch_time_t *result, switch_time_exp_t *input) |
switch_status_t | switch_time_exp_lt (switch_time_exp_t *result, switch_time_t input) |
switch_status_t | switch_time_exp_tz (switch_time_exp_t *result, switch_time_t input, switch_int32_t offs) |
void | switch_sleep (switch_interval_time_t t) |
void | switch_micro_sleep (switch_interval_time_t t) |
typedef int64_t switch_interval_time_t |
number of microseconds in the interval
Definition at line 191 of file switch_apr.h.
typedef struct switch_time_exp_t switch_time_exp_t |
a structure similar to ANSI struct tm with the following differences:
typedef int64_t switch_time_t |
number of microseconds since 00:00:00 january 1, 1970 UTC
Definition at line 188 of file switch_apr.h.
void switch_micro_sleep | ( | switch_interval_time_t | t | ) |
switch_status_t switch_rfc822_date | ( | char * | date_str, |
switch_time_t | t | ||
) |
switch_rfc822_date formats dates in the RFC822 format in an efficient manner. It is a fixed length format which requires the indicated amount of storage, including the trailing NUL terminator.
date_str | String to write to. |
t | the time to convert |
Definition at line 361 of file switch_apr.c.
Referenced by switch_event_prep_for_delivery_detailed().
void switch_sleep | ( | switch_interval_time_t | t | ) |
Sleep for the specified number of micro-seconds.
t | desired amount of time to sleep. |
Definition at line 640 of file switch_time.c.
References do_sleep(), globals, and switch_cond_yield().
Referenced by fst_init_core_and_modload(), main(), and switch_msleep().
switch_status_t switch_strftime | ( | char * | s, |
switch_size_t * | retsize, | ||
switch_size_t | max, | ||
const char * | format, | ||
switch_time_exp_t * | tm | ||
) |
formats the exploded time according to the format specified
s | string to write to |
retsize | The length of the returned string |
max | The maximum length of the string |
format | The format for the time string |
tm | The time to convert |
Definition at line 150 of file switch_apr.c.
References format, and SWITCH_STATUS_FALSE.
Referenced by switch_xml_std_datetime_check().
switch_status_t switch_strftime_nocheck | ( | char * | s, |
switch_size_t * | retsize, | ||
switch_size_t | max, | ||
const char * | format, | ||
switch_time_exp_t * | tm | ||
) |
formats the exploded time according to the format specified (does not validate format string)
s | string to write to |
retsize | The length of the returned string |
max | The maximum length of the string |
format | The format for the time string |
tm | The time to convert |
Definition at line 202 of file switch_apr.c.
Referenced by switch_channel_set_timestamps(), switch_console_printf(), switch_event_prep_for_delivery_detailed(), and switch_strftime_tz().
switch_status_t switch_time_exp_get | ( | switch_time_t * | result, |
switch_time_exp_t * | input | ||
) |
Convert time value from human readable format to a numeric fspr_time_t e.g. elapsed usec since epoch
result | the resulting imploded time |
input | the input exploded time |
Definition at line 341 of file switch_apr.c.
Referenced by switch_str_time().
switch_status_t switch_time_exp_gmt | ( | switch_time_exp_t * | result, |
switch_time_t | input | ||
) |
convert a time to its human readable components in GMT timezone
result | the exploded time |
input | the time to explode |
Definition at line 356 of file switch_apr.c.
Referenced by process_rtcp_report(), and rtcp_generate_sender_info().
switch_status_t switch_time_exp_gmt_get | ( | switch_time_t * | result, |
switch_time_exp_t * | input | ||
) |
Convert time value from human readable format to a numeric fspr_time_t that always represents GMT
result | the resulting imploded time |
input | the input exploded time |
Definition at line 336 of file switch_apr.c.
Referenced by switch_str_time().
switch_status_t switch_time_exp_lt | ( | switch_time_exp_t * | result, |
switch_time_t | input | ||
) |
convert a time to its human readable components in local timezone
result | the exploded time |
input | the time to explode |
Definition at line 346 of file switch_apr.c.
Referenced by switch_channel_set_timestamps(), switch_console_printf(), switch_event_prep_for_delivery_detailed(), switch_log_meta_vprintf(), switch_str_time(), and switch_xml_std_datetime_check().
switch_status_t switch_time_exp_tz | ( | switch_time_exp_t * | result, |
switch_time_t | input, | ||
switch_int32_t | offs | ||
) |
convert a time to its human readable components in a specific timezone with offset
result | the exploded time |
input | the time to explode |
Definition at line 351 of file switch_apr.c.
Referenced by switch_xml_std_datetime_check().
switch_time_t switch_time_make | ( | switch_time_t | sec, |
int32_t | usec | ||
) |
Definition at line 366 of file switch_apr.c.
switch_time_t switch_time_now | ( | void | ) |
Definition at line 325 of file switch_apr.c.
Referenced by record_callback(), switch_channel_clear_flag(), switch_channel_perform_hangup(), switch_channel_set_flag_value(), switch_core_media_read_frame(), switch_core_session_exec(), switch_core_session_request_xml(), switch_ivr_dmachine_check_timeout(), switch_ivr_dmachine_feed(), switch_jb_pop_nack(), switch_micro_time_now(), SWITCH_MODULE_RUNTIME_FUNCTION(), switch_send_rtcp_event(), switch_time_sync(), and time_now().