FreeSWITCH API Documentation
1.7.0
|
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 338 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 620 of file switch_time.c.
References do_sleep(), globals, and switch_cond_yield().
Referenced by 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 127 of file switch_apr.c.
References 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 179 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 apr_time_t e.g. elapsed usec since epoch
result | the resulting imploded time |
input | the input exploded time |
Definition at line 318 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 333 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 apr_time_t that always represents GMT
result | the resulting imploded time |
input | the input exploded time |
Definition at line 313 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 323 of file switch_apr.c.
Referenced by switch_channel_set_timestamps(), switch_console_printf(), switch_event_prep_for_delivery_detailed(), switch_log_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 328 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 343 of file switch_apr.c.
switch_time_t switch_time_now | ( | void | ) |
Definition at line 302 of file switch_apr.c.
Referenced by process_rtcp_report(), record_callback(), rtcp_generate_report_block(), rtcp_generate_sender_info(), rtp_common_write(), 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_rtp_create(), switch_rtp_enable_vad(), switch_time_sync(), time_now(), and timer_generic_sync().