diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-02-19 14:16:24 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-19 17:01:40 -0800 |
commit | 305d0e79e219b427c6425dab0715ed2132d928b8 (patch) | |
tree | 9962f0fd34c1d0488255785cf99243708dec4fb6 /host/examples/rx_samples_to_file.cpp | |
parent | 21b5f2c6aa88af5488b140da0ef7ed34cc14153f (diff) | |
download | uhd-305d0e79e219b427c6425dab0715ed2132d928b8.tar.gz uhd-305d0e79e219b427c6425dab0715ed2132d928b8.tar.bz2 uhd-305d0e79e219b427c6425dab0715ed2132d928b8.zip |
examples: Fix some minor compiler warnings
All warnings reported by MSVC. Mostly related to narrowing conversions.
Diffstat (limited to 'host/examples/rx_samples_to_file.cpp')
-rw-r--r-- | host/examples/rx_samples_to_file.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/host/examples/rx_samples_to_file.cpp b/host/examples/rx_samples_to_file.cpp index b4ca8cfee..59de6c26b 100644 --- a/host/examples/rx_samples_to_file.cpp +++ b/host/examples/rx_samples_to_file.cpp @@ -17,6 +17,8 @@ #include <fstream> #include <csignal> #include <complex> +#include <thread> +#include <chrono> namespace po = boost::program_options; @@ -184,7 +186,7 @@ bool check_locked_sensor(std::vector<std::string> sensor_names, const char* sens std::cout.flush(); } else { - first_lock_time = boost::system_time(); //reset to 'not a date time' + first_lock_time = boost::system_time(); //reset to 'not a date time' if (boost::get_system_time() > (start + boost::posix_time::seconds(setup_time))){ std::cout << std::endl; @@ -193,7 +195,7 @@ bool check_locked_sensor(std::vector<std::string> sensor_names, const char* sens std::cout << "_"; std::cout.flush(); } - boost::this_thread::sleep(boost::posix_time::milliseconds(100)); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); } std::cout << std::endl; return true; @@ -307,7 +309,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //set the antenna if (vm.count("ant")) usrp->set_rx_antenna(ant); - boost::this_thread::sleep(boost::posix_time::seconds(setup_time)); //allow for some setup time + std::this_thread::sleep_for( + std::chrono::milliseconds(int64_t(1000 * setup_time)) + ); //check Ref and LO Lock detect if (not vm.count("skip-lo")){ |