[Freeswitch-svn] [commit] r2728 - in freeswitch/trunk/src: include mod/timers/mod_softtimer
Freeswitch SVN
mikej at freeswitch.org
Sun Sep 17 18:13:51 EDT 2006
Author: mikej
Date: Sun Sep 17 18:13:51 2006
New Revision: 2728
Modified:
freeswitch/trunk/src/include/switch_apr.h
freeswitch/trunk/src/include/switch_utils.h
freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
Log:
tweak softimer to not int type truncate microsecond interval time.c
Modified: freeswitch/trunk/src/include/switch_apr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_apr.h (original)
+++ freeswitch/trunk/src/include/switch_apr.h Sun Sep 17 18:13:51 2006
@@ -1053,6 +1053,9 @@
/** 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
Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h (original)
+++ freeswitch/trunk/src/include/switch_utils.h Sun Sep 17 18:13:51 2006
@@ -169,7 +169,7 @@
#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
/*!
Modified: freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
==============================================================================
--- freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c (original)
+++ freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c Sun Sep 17 18:13:51 2006
@@ -38,7 +38,7 @@
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";
More information about the Freeswitch-svn
mailing list