#include "vlc_messages.h"
#include "vlc_variables.h"
#include "vlc_objects.h"
-#include "vlc_threads_funcs.h"
#include "vlc_mtime.h"
+#include "vlc_threads_funcs.h"
#include "vlc_modules.h"
#include "main.h"
#include "vlc_configuration.h"
# ifdef DEBUG
/* In debug mode, timeout */
- struct timespec timeout;
-
-# if defined (_POSIX_CLOCK_MONOTONIC) && (_POSIX_CLOCK_MONOTONIC >= 0)
- if( clock_gettime( CLOCK_MONOTONIC, &timeout ) )
-# endif
- clock_gettime( CLOCK_REALTIME, &timeout );
-
- timeout.tv_sec += THREAD_COND_TIMEOUT;
+ struct timespec timeout = {
+ (mdate() / 1000000) + THREAD_COND_TIMEOUT,
+ 0 /* 1Hz precision is sufficient here :-) */
+ };
i_result = pthread_cond_timedwait( &p_condvar->cond, &p_mutex->mutex,
&timeout );