diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-08-24 15:48:42 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-03-05 13:53:45 -0800 |
commit | 7fa1f6ed0726ff0f908245e43a01f50620293e8d (patch) | |
tree | 714036231990d38fc4ccd2b2913b6a4ebac2235d /host/examples/twinrx_freq_hopping.cpp | |
parent | 347bb79d2adef4b5bf3e3a94577ecc18c0408519 (diff) | |
download | uhd-7fa1f6ed0726ff0f908245e43a01f50620293e8d.tar.gz uhd-7fa1f6ed0726ff0f908245e43a01f50620293e8d.tar.bz2 uhd-7fa1f6ed0726ff0f908245e43a01f50620293e8d.zip |
uhd: Moved get_system_time outside of public API
uhd::get_system_time() is an abstracted way of reading back a time, and
is not UHD-specific. As such, there's no reason to keep it in the public
part of the API where we're contractually obligated not to touch it.
Instead, moving it to the internal API space.
Diffstat (limited to 'host/examples/twinrx_freq_hopping.cpp')
-rw-r--r-- | host/examples/twinrx_freq_hopping.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/host/examples/twinrx_freq_hopping.cpp b/host/examples/twinrx_freq_hopping.cpp index 516af123b..e6819adde 100644 --- a/host/examples/twinrx_freq_hopping.cpp +++ b/host/examples/twinrx_freq_hopping.cpp @@ -14,6 +14,7 @@ #include <boost/program_options.hpp> #include <boost/thread.hpp> +#include <boost/thread/thread_time.hpp> #include <fstream> @@ -222,7 +223,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ while(1) { std::cout << "Scanning..." << std::endl; - uhd::time_spec_t start_time = uhd::time_spec_t::get_system_time(); + auto start_time = boost::get_system_time(); for (size_t i = 0; i < rf_freqs.size(); i++) { // Swap the mapping of synthesizers by setting the LO source @@ -249,8 +250,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ } } - uhd::time_spec_t end_time = uhd::time_spec_t::get_system_time(); - std::cout << boost::format("Sweep done in %d milliseconds.\n") % ((end_time - start_time).get_real_secs() * 1000); + auto end_time = boost::get_system_time(); + std::cout + << boost::format("Sweep done in %d milliseconds.\n") + % ((end_time - start_time).total_milliseconds() * 1000); // Optionally convert received samples to FFT and write to file if(vm.count("fft-path")) { |