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/usrp2/io_impl.cpp | 4 +++- host/lib/usrp/usrp2/usrp2_iface.cpp | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/usrp2') diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 2b8c7a5d1..7042f0391 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -26,6 +26,8 @@ #include #include #include +#include +#include using namespace uhd; using namespace uhd::usrp; @@ -384,7 +386,7 @@ void usrp2_impl::program_stream_dest( std::memcpy(send_buff->cast(), &stream_ctrl, sizeof(stream_ctrl)); send_buff->commit(sizeof(stream_ctrl)); send_buff.reset(); - boost::this_thread::sleep(boost::posix_time::milliseconds(300)); + std::this_thread::sleep_for(std::chrono::milliseconds(300)); managed_recv_buffer::sptr recv_buff = xport->get_recv_buff(0.0); if (recv_buff and recv_buff->size() >= sizeof(uint32_t)){ const uint32_t result = uhd::ntohx(recv_buff->cast()[0]); diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp index a3d1bc390..c8283c500 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.cpp +++ b/host/lib/usrp/usrp2/usrp2_iface.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include //used for htonl and ntohl #include #include @@ -26,6 +25,8 @@ #include #include #include +#include +#include #include using namespace uhd; @@ -118,7 +119,7 @@ public: //re-lock in task this->pokefw(U2_FW_REG_LOCK_TIME, this->get_curr_time()); //sleep for a bit - boost::this_thread::sleep(boost::posix_time::milliseconds(1500)); + std::this_thread::sleep_for(std::chrono::milliseconds(1500)); } uint32_t get_curr_time(void){ -- cgit v1.2.3