From 0303f1ed558b21e40f80c388b096432b4bf6e883 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 26 Apr 2018 09:30:48 -0700 Subject: lib: Purge all references to boost::this_thread::sleep() Replace with std::this_thread::sleep_for(). --- host/lib/usrp/e300/e300_impl.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/e300/e300_impl.cpp') diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp index 324b25407..9aa872ff3 100644 --- a/host/lib/usrp/e300/e300_impl.cpp +++ b/host/lib/usrp/e300/e300_impl.cpp @@ -32,9 +32,10 @@ #include #include #include -#include //sleep #include #include +#include +#include using namespace uhd; using namespace uhd::usrp; @@ -395,7 +396,7 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr) ad9361_params::sptr client_settings = boost::make_shared(); _codec_ctrl = ad9361_ctrl::make_spi(client_settings, spi::make(E300_SPIDEV_DEVICE), 1); // This is horrible ... why do I have to sleep here? - boost::this_thread::sleep(boost::posix_time::milliseconds(100)); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); _eeprom_manager = boost::make_shared(i2c::make_i2cdev(E300_I2CDEV_DEVICE)); _sensor_manager = e300_sensor_manager::make_local(_global_regs); } @@ -415,7 +416,7 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr) if (_gps) { for (size_t i = 0; i < _GPS_TIMEOUT; i++) { - boost::this_thread::sleep(boost::posix_time::seconds(1)); + std::this_thread::sleep_for(std::chrono::seconds(1)); if (!_gps->gps_detected()) std::cout << "." << std::flush; else { @@ -1141,7 +1142,7 @@ void e300_impl::_reset_codec_mmcm(void) { _misc.codec_arst = 1; _update_gpio_state(); - boost::this_thread::sleep(boost::posix_time::milliseconds(10)); + std::this_thread::sleep_for(std::chrono::milliseconds(10)); _misc.codec_arst = 0; _update_gpio_state(); } -- cgit v1.2.3