[pulseaudio-commits] r1780 - /branches/lennart/src/pulsecore/rtclock.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Sep 10 04:27:57 PDT 2007


Author: ossman
Date: Mon Sep 10 13:27:56 2007
New Revision: 1780

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1780&root=pulseaudio&view=rev
Log:
Monotonic clock is optional so treat is as such.

Modified:
    branches/lennart/src/pulsecore/rtclock.c

Modified: branches/lennart/src/pulsecore/rtclock.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/rtclock.c?rev=1780&root=pulseaudio&r1=1779&r2=1780&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/rtclock.c (original)
+++ branches/lennart/src/pulsecore/rtclock.c Mon Sep 10 13:27:56 2007
@@ -139,9 +139,11 @@
     pa_assert(ts);
 
     if (!no_monotonic) {
+#ifdef CLOCK_MONOTONIC
         if (clock_gettime(CLOCK_MONOTONIC, ts) >= 0)
             return ts;
-        
+#endif        
+
         no_monotonic = 1;
     }
 
@@ -152,8 +154,10 @@
 int pa_rtclock_hrtimer(void) {
     struct timespec ts;
     
+#ifdef CLOCK_MONOTONIC
     if (clock_getres(CLOCK_MONOTONIC, &ts) >= 0)
         return ts.tv_sec == 0 && ts.tv_nsec <= PA_HRTIMER_THRESHOLD_USEC*1000;
+#endif        
 
     pa_assert_se(clock_getres(CLOCK_REALTIME, &ts) == 0);
     return ts.tv_sec == 0 && ts.tv_nsec <= PA_HRTIMER_THRESHOLD_USEC*1000;




More information about the pulseaudio-commits mailing list