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/examples/test_dboard_coercion.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'host/examples/test_dboard_coercion.cpp') diff --git a/host/examples/test_dboard_coercion.cpp b/host/examples/test_dboard_coercion.cpp index 7696e895c..a761f662d 100644 --- a/host/examples/test_dboard_coercion.cpp +++ b/host/examples/test_dboard_coercion.cpp @@ -10,12 +10,13 @@ #include #include #include -#include #include #include #include #include #include +#include +#include static const double SAMP_RATE = 1e6; @@ -148,7 +149,7 @@ std::string coercion_test(uhd::usrp::multi_usrp::sptr usrp, std::string type, in if(type == "TX") usrp->set_tx_freq(freq,chan); else usrp->set_rx_freq(freq,chan); - boost::this_thread::sleep(boost::posix_time::microseconds(long(1000))); + std::this_thread::sleep_for(std::chrono::microseconds(long(1000))); double actual_freq = (type == "TX") ? usrp->get_tx_freq(chan) : usrp->get_rx_freq(chan); @@ -185,7 +186,7 @@ std::string coercion_test(uhd::usrp::multi_usrp::sptr usrp, std::string type, in if (is_locked) { break; } - boost::this_thread::sleep(boost::posix_time::microseconds(1000)); + std::this_thread::sleep_for(std::chrono::microseconds(1000)); } if(is_locked){ if(verbose) std::cout << boost::format("LO successfully locked at %s frequency %s.") @@ -206,7 +207,7 @@ std::string coercion_test(uhd::usrp::multi_usrp::sptr usrp, std::string type, in if(type == "TX") usrp->set_tx_gain(gain,chan); else usrp->set_rx_gain(gain,chan); - boost::this_thread::sleep(boost::posix_time::microseconds(1000)); + std::this_thread::sleep_for(std::chrono::microseconds(1000)); double actual_gain = (type == "TX") ? usrp->get_tx_gain(chan) : usrp->get_rx_gain(chan); @@ -410,7 +411,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //Setting clock source usrp->set_clock_source(ref); - boost::this_thread::sleep(boost::posix_time::seconds(1)); + std::this_thread::sleep_for(std::chrono::seconds(1)); std::vector sensor_names = usrp->get_mboard_sensor_names(0); if ((ref == "mimo") and (std::find(sensor_names.begin(), sensor_names.end(), "mimo_locked") != sensor_names.end())) { -- cgit v1.2.3