提交 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 ...@@ -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 */ /** number of microseconds since 00:00:00 january 1, 1970 UTC */
typedef apr_time_t switch_time_t; 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: * a structure similar to ANSI struct tm with the following differences:
* - tm_usec isn't an ANSI field * - tm_usec isn't an ANSI field
......
...@@ -169,7 +169,7 @@ switch_mutex_unlock(obj->flag_mutex); ...@@ -169,7 +169,7 @@ switch_mutex_unlock(obj->flag_mutex);
#ifdef HAVE_USLEEP #ifdef HAVE_USLEEP
#define switch_yield(ms) usleep(ms); #define switch_yield(ms) usleep(ms);
#else #else
#define switch_yield(ms) apr_sleep(ms * 10); //apr_thread_yield(); #define switch_yield(ms) apr_sleep((ms) * 10); //apr_thread_yield();
#endif #endif
/*! /*!
......
...@@ -38,7 +38,7 @@ static struct { ...@@ -38,7 +38,7 @@ static struct {
int32_t RUNNING; int32_t RUNNING;
switch_mutex_t *mutex; switch_mutex_t *mutex;
uint32_t timer_milliseconds; uint32_t timer_milliseconds;
uint32_t timer_microseconds; switch_interval_time_t timer_microseconds;
} globals; } globals;
static const char modname[] = "mod_softtimer"; static const char modname[] = "mod_softtimer";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论