diff --git a/rtc_base/event.cc b/rtc_base/event.cc index 32c1b0334e..ff4faadd67 100644 --- a/rtc_base/event.cc +++ b/rtc_base/event.cc @@ -85,12 +85,6 @@ bool Event::Wait(int milliseconds) { // Converting from seconds and microseconds (1e-6) plus // milliseconds (1e-3) to seconds and nanoseconds (1e-9). -#ifdef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE - // Use relative time version, which tends to be more efficient for - // pthread implementations where provided (like on Android). - ts.tv_sec = milliseconds / 1000; - ts.tv_nsec = (milliseconds % 1000) * 1000000; -#else struct timeval tv; gettimeofday(&tv, nullptr); @@ -102,18 +96,12 @@ bool Event::Wait(int milliseconds) { ts.tv_sec++; ts.tv_nsec -= 1000000000; } -#endif } pthread_mutex_lock(&event_mutex_); if (milliseconds != kForever) { while (!event_status_ && error == 0) { -#ifdef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE - error = pthread_cond_timedwait_relative_np( - &event_cond_, &event_mutex_, &ts); -#else error = pthread_cond_timedwait(&event_cond_, &event_mutex_, &ts); -#endif } } else { while (!event_status_ && error == 0)