Type Alias switch_timer_interface_t

Source
pub type switch_timer_interface_t = switch_timer_interface;
Expand description

\brief A table of functions that a timer module implements

Aliased Type§

#[repr(C)]
pub struct switch_timer_interface_t { pub interface_name: *const i8, pub timer_init: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>, pub timer_next: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>, pub timer_step: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>, pub timer_sync: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>, pub timer_check: Option<unsafe extern "C" fn(*mut switch_timer, u32) -> switch_status_t>, pub timer_destroy: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>, pub rwlock: *mut fspr_thread_rwlock_t, pub refs: i32, pub reflock: *mut fspr_thread_mutex_t, pub parent: *mut switch_loadable_module_interface, pub next: *mut switch_timer_interface, }

Fields§

§interface_name: *const i8

the name of the interface

§timer_init: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>

function to allocate the timer

§timer_next: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>

function to wait for one cycle to pass

§timer_step: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>

function to step the timer one step

§timer_sync: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>

function to reset the timer

§timer_check: Option<unsafe extern "C" fn(*mut switch_timer, u32) -> switch_status_t>

function to check if the current step has expired

§timer_destroy: Option<unsafe extern "C" fn(*mut switch_timer) -> switch_status_t>

function to deallocate the timer

§rwlock: *mut fspr_thread_rwlock_t§refs: i32§reflock: *mut fspr_thread_mutex_t§parent: *mut switch_loadable_module_interface§next: *mut switch_timer_interface