From 37c50bf0521e8ec088e1ea3dc038805b1d3b6648 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 15 Sep 2007 17:00:25 +0000 Subject: [PATCH] Use monotonic clock when available only --- src/misc/threads.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/misc/threads.c b/src/misc/threads.c index 1fa748975a..c12ccfab7d 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -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); -- 2.39.5