提交 fa4a1c43 authored 作者: Michael Jerris's avatar Michael Jerris

tweak softimer to not int type truncate microsecond interval time.c

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2728 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 3969362f
......@@ -1053,6 +1053,9 @@ DoxyDefine(apr_status_t switch_poll(switch_pollfd_t *aprset, apr_int32_t numsock
/** number of microseconds since 00:00:00 january 1, 1970 UTC */
typedef apr_time_t switch_time_t;
/** number of microseconds in the interval */
typedef apr_interval_time_t switch_interval_time_t;
/**
* a structure similar to ANSI struct tm with the following differences:
* - tm_usec isn't an ANSI field
......
......@@ -169,7 +169,7 @@ switch_mutex_unlock(obj->flag_mutex);
#ifdef HAVE_USLEEP
#define switch_yield(ms) usleep(ms);
#else
#define switch_yield(ms) apr_sleep(ms * 10); //apr_thread_yield();
#define switch_yield(ms) apr_sleep((ms) * 10); //apr_thread_yield();
#endif
/*!
......
......@@ -38,7 +38,7 @@ static struct {
int32_t RUNNING;
switch_mutex_t *mutex;
uint32_t timer_milliseconds;
uint32_t timer_microseconds;
switch_interval_time_t timer_microseconds;
} globals;
static const char modname[] = "mod_softtimer";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论