]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 3 Jan 2008 21:41:15 +0000 (21:41 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 3 Jan 2008 21:41:15 +0000 (21:41 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7076 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_apr.c
src/switch_time.c

index 6a92d3341b40681fdb70cf9a2556302d7abbc98c..34a4cc57919f15d20cb024b8aea5bf2c62350a03 100644 (file)
@@ -233,7 +233,7 @@ SWITCH_DECLARE(switch_status_t) switch_mutex_trylock(switch_mutex_t * lock)
 
 SWITCH_DECLARE(switch_time_t) switch_time_now(void)
 {
-#ifdef HAVE_CLOCK_GETTIME
+#if defined(HAVE_CLOCK_GETTIME) && defined(SWITCH_USE_CLOCK_FUNCS)
        struct timespec ts;
        clock_gettime(CLOCK_REALTIME,&ts);
        return ts.tv_sec * APR_USEC_PER_SEC + (ts.tv_nsec/1000);
index 1239084b6849f55bacc6b3654b0818d1b09d8a3d..dc064bf4c6c046ea20882f59d0b991466a85706c 100644 (file)
@@ -82,8 +82,8 @@ static timer_matrix_t TIMER_MATRIX[MAX_ELEMENTS + 1];
 
 SWITCH_DECLARE(void) switch_sleep(switch_interval_time_t t)
 {
-       
-#if defined(HAVE_CLOCK_NANOSLEEP)
+
+#if defined(HAVE_CLOCK_NANOSLEEP) && defined(SWITCH_USE_CLOCK_FUNCS)   
        struct timespec ts;
        ts.tv_sec = t / APR_USEC_PER_SEC;
        ts.tv_nsec = (t % APR_USEC_PER_SEC) * 1000;