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
This commit is contained in:
parent
3969362f6e
commit
fa4a1c4317
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue