mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@418 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -71,9 +71,9 @@ static switch_status soft_timer_next(switch_timer *timer)
|
||||
|
||||
#ifdef WINTIMER
|
||||
private->base.QuadPart += timer->interval * (private->freq.QuadPart / 1000);
|
||||
for (;;) {
|
||||
for(;;) {
|
||||
QueryPerformanceCounter(&private->now);
|
||||
if (private->now.QuadPart >= private->base.QuadPart) {
|
||||
if(private->now.QuadPart >= private->base.QuadPart) {
|
||||
break;
|
||||
}
|
||||
switch_yield(100);
|
||||
@@ -98,27 +98,31 @@ static switch_status soft_timer_destroy(switch_timer *timer)
|
||||
}
|
||||
|
||||
static const switch_timer_interface soft_timer_interface = {
|
||||
/*.interface_name */ "soft",
|
||||
/*.timer_init */ soft_timer_init,
|
||||
/*.timer_next */ soft_timer_next,
|
||||
/*.timer_destroy */ soft_timer_destroy
|
||||
/*.interface_name*/ "soft",
|
||||
/*.timer_init*/ soft_timer_init,
|
||||
/*.timer_next*/ soft_timer_next,
|
||||
/*.timer_destroy*/ soft_timer_destroy
|
||||
};
|
||||
|
||||
static const switch_loadable_module_interface mod_timers_module_interface = {
|
||||
/*.module_name */ modname,
|
||||
/*.endpoint_interface */ NULL,
|
||||
/*.timer_interface */ &soft_timer_interface,
|
||||
/*.switch_dialplan_interface */ NULL,
|
||||
/*.switch_codec_interface */ NULL,
|
||||
/*.switch_application_interface */ NULL
|
||||
/*.module_name*/ modname,
|
||||
/*.endpoint_interface*/ NULL,
|
||||
/*.timer_interface*/ &soft_timer_interface,
|
||||
/*.switch_dialplan_interface*/ NULL,
|
||||
/*.switch_codec_interface*/ NULL,
|
||||
/*.switch_application_interface*/ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
|
||||
{
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename) {
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &mod_timers_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user