Commit 37c50bf0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use monotonic clock when available only

parent 727196a7
...@@ -464,8 +464,10 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar ) ...@@ -464,8 +464,10 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar )
if (ret) if (ret)
return 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 */ /* This must be the same clock as the one in mtime.c */
pthread_condattr_setclock (&attr, CLOCK_MONOTONIC); pthread_condattr_setclock (&attr, CLOCK_MONOTONIC);
# endif
ret = pthread_cond_init (&p_condvar->cond, &attr); ret = pthread_cond_init (&p_condvar->cond, &attr);
pthread_condattr_destroy (&attr); pthread_condattr_destroy (&attr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment