diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-04-26 09:30:48 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-04-30 17:10:26 -0700 |
commit | 0303f1ed558b21e40f80c388b096432b4bf6e883 (patch) | |
tree | 05afcc4d2401bb86f9e38e3b04ec5b07e9268302 /host/examples/test_clock_synch.cpp | |
parent | fc67052345373c6d5c1b62064a9f9ef6f888e3ff (diff) | |
download | uhd-0303f1ed558b21e40f80c388b096432b4bf6e883.tar.gz uhd-0303f1ed558b21e40f80c388b096432b4bf6e883.tar.bz2 uhd-0303f1ed558b21e40f80c388b096432b4bf6e883.zip |
lib: Purge all references to boost::this_thread::sleep()
Replace with std::this_thread::sleep_for().
Diffstat (limited to 'host/examples/test_clock_synch.cpp')
-rw-r--r-- | host/examples/test_clock_synch.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/host/examples/test_clock_synch.cpp b/host/examples/test_clock_synch.cpp index 6f15887e8..38bc4980a 100644 --- a/host/examples/test_clock_synch.cpp +++ b/host/examples/test_clock_synch.cpp @@ -5,12 +5,6 @@ // SPDX-License-Identifier: GPL-3.0-or-later // -#include <iostream> - -#include <boost/format.hpp> -#include <boost/program_options.hpp> -#include <boost/thread/thread.hpp> - #include <uhd/device.hpp> #include <uhd/exception.hpp> #include <uhd/usrp_clock/multi_usrp_clock.hpp> @@ -19,6 +13,13 @@ #include <uhd/utils/safe_main.hpp> #include <uhd/utils/thread.hpp> +#include <boost/format.hpp> +#include <boost/program_options.hpp> + +#include <iostream> +#include <chrono> +#include <thread> + namespace po = boost::program_options; using namespace uhd::usrp_clock; @@ -102,7 +103,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ for(size_t i = 0; i < num_tests; i++){ //Wait random time before querying uint16_t wait_time = rand() % max_interval; - boost::this_thread::sleep(boost::posix_time::milliseconds(wait_time)); + std::this_thread::sleep_for(std::chrono::milliseconds(wait_time)); //Get all times before output std::vector<time_t> usrp_times(usrp->get_num_mboards()); |