From 7fa1f6ed0726ff0f908245e43a01f50620293e8d Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 24 Aug 2017 15:48:42 -0700 Subject: 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. --- host/examples/twinrx_freq_hopping.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'host/examples') 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 #include +#include #include @@ -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")) { -- cgit v1.2.3