]> git.sesse.net Git - vlc/commitdiff
Use monotonic clock when available only
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Sep 2007 17:00:25 +0000 (17:00 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Sep 2007 17:00:25 +0000 (17:00 +0000)
src/misc/threads.c

index 1fa748975a1beb51e693360ec9189bfffd440714..c12ccfab7d48b60ce152506445cd84f65d3b67f5 100644 (file)
@@ -464,8 +464,10 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar )
     if (ret)
         return ret;
 
+# if defined (HAVE_CLOCK_NANOSLEEP) && (_POSIX_CLOCK_MONOTONIC - 0 >= 0)
     /* This must be the same clock as the one in mtime.c */
     pthread_condattr_setclock (&attr, CLOCK_MONOTONIC);
+# endif
 
     ret = pthread_cond_init (&p_condvar->cond, &attr);
     pthread_condattr_destroy (&attr);