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/tx_waveforms.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/tx_waveforms.cpp')
-rw-r--r-- | host/examples/tx_waveforms.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index 04cd8f3b4..e1b55eb1a 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -14,12 +14,13 @@ #include <boost/program_options.hpp> #include <boost/math/special_functions/round.hpp> #include <boost/format.hpp> -#include <boost/thread.hpp> #include <boost/algorithm/string.hpp> #include <stdint.h> #include <iostream> #include <csignal> #include <string> +#include <chrono> +#include <thread> namespace po = boost::program_options; @@ -140,7 +141,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ if (vm.count("ant")) usrp->set_tx_antenna(ant, channel_nums[ch]); } - boost::this_thread::sleep(boost::posix_time::seconds(1)); //allow for some setup time + std::this_thread::sleep_for(std::chrono::seconds(1)); //allow for some setup time //for the const wave, set the wave freq for small samples per period if (wave_freq == 0 and wave_type == "CONST"){ @@ -188,14 +189,14 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ usrp->set_time_now(uhd::time_spec_t(0.0), 0); //sleep a bit while the slave locks its time to the master - boost::this_thread::sleep(boost::posix_time::milliseconds(100)); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); } else { if (pps == "internal" or pps == "external" or pps == "gpsdo") usrp->set_time_source(pps); usrp->set_time_unknown_pps(uhd::time_spec_t(0.0)); - boost::this_thread::sleep(boost::posix_time::seconds(1)); //wait for pps sync pulse + std::this_thread::sleep_for(std::chrono::seconds(1)); //wait for pps sync pulse } } else |