diff --git a/clients/roscpp/include/boost_161_condition_variable.h b/clients/roscpp/include/boost_161_condition_variable.h index 7277ce1dc4..6e13915493 100644 --- a/clients/roscpp/include/boost_161_condition_variable.h +++ b/clients/roscpp/include/boost_161_condition_variable.h @@ -16,7 +16,6 @@ namespace boost_161 { using condition_variable = boost::condition_variable; } #elif defined(BOOST_THREAD_PLATFORM_PTHREAD) -//#include #include "boost_161_pthread_condition_variable.h" #else #error "Boost threads unavailable on this platform" diff --git a/clients/roscpp/include/ros/timer_manager.h b/clients/roscpp/include/ros/timer_manager.h index 8588352a99..1cf1346d33 100644 --- a/clients/roscpp/include/ros/timer_manager.h +++ b/clients/roscpp/include/ros/timer_manager.h @@ -566,14 +566,14 @@ void TimerManager::threadFunc() // since simulation time may be running faster than real time. if (!T::isSystemTime()) { - timers_cond_.timed_wait(lock, boost::posix_time::milliseconds(1)); + timers_cond_.wait_for(lock, boost::chrono::milliseconds(1)); } else { // On system time we can simply sleep for the rest of the wait time, since anything else requiring processing will // signal the condition variable int64_t remaining_time = std::max((sleep_end - current).toSec() * 1000.0f, 1); - timers_cond_.timed_wait(lock, boost::posix_time::milliseconds(remaining_time)); + timers_cond_.wait_for(lock, boost::chrono::milliseconds(remaining_time)); } }