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/sync_to_gps.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'host/examples/sync_to_gps.cpp') diff --git a/host/examples/sync_to_gps.cpp b/host/examples/sync_to_gps.cpp index f76e0d3ca..0b7f030bc 100644 --- a/host/examples/sync_to_gps.cpp +++ b/host/examples/sync_to_gps.cpp @@ -9,8 +9,9 @@ #include #include #include -#include #include +#include +#include namespace po = boost::program_options; @@ -80,7 +81,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) if (not ref_locked) { std::cout << "." << std::flush; - boost::this_thread::sleep(boost::posix_time::seconds(1)); + std::this_thread::sleep_for(std::chrono::seconds(1)); } } if(ref_locked) @@ -117,7 +118,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) //The wait is 2 seconds because N-Series has a known issue where //the time at the last PPS does not properly update at the PPS edge //when the time is actually set. - boost::this_thread::sleep(boost::posix_time::seconds(2)); + std::this_thread::sleep_for(std::chrono::seconds(2)); //Check times gps_time = uhd::time_spec_t(time_t(usrp->get_mboard_sensor("gps_time", mboard).to_int())); @@ -137,11 +138,11 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) uhd::time_spec_t time_last_pps = usrp->get_time_last_pps(); while (time_last_pps == usrp->get_time_last_pps()) { - boost::this_thread::sleep(boost::posix_time::milliseconds(1)); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); } //Sleep a little to make sure all devices have seen a PPS edge - boost::this_thread::sleep(boost::posix_time::milliseconds(200)); + std::this_thread::sleep_for(std::chrono::milliseconds(200)); //Compare times across all mboards bool all_matched = true; -- cgit v1.2.3