diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-05-09 16:56:35 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-05-14 17:24:19 -0700 |
commit | 38a7fa64f464084fa11708bdbe00cfabc311df29 (patch) | |
tree | d8fa3985a87d237715496ae1f800c76dbf189f6f /host/lib/usrp/multi_usrp.cpp | |
parent | 5df5177d49b999ccab30199f9becfa84c1bef52e (diff) | |
download | uhd-38a7fa64f464084fa11708bdbe00cfabc311df29.tar.gz uhd-38a7fa64f464084fa11708bdbe00cfabc311df29.tar.bz2 uhd-38a7fa64f464084fa11708bdbe00cfabc311df29.zip |
lib: Remove some unnecessary use of boost::posix_time
Replace by std::chrono.
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 2a3e2e80f..b408e44e4 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -612,13 +612,14 @@ public: } void set_time_unknown_pps(const time_spec_t &time_spec){ - UHD_LOGGER_INFO("MULTI_USRP") << " 1) catch time transition at pps edge"; - boost::system_time end_time = boost::get_system_time() + boost::posix_time::milliseconds(1100); + UHD_LOGGER_INFO("MULTI_USRP") + << " 1) catch time transition at pps edge"; + auto end_time = std::chrono::steady_clock::now() + + std::chrono::milliseconds(1100); time_spec_t time_start_last_pps = get_time_last_pps(); while (time_start_last_pps == get_time_last_pps()) { - if (boost::get_system_time() > end_time) - { + if (std::chrono::steady_clock::now() > end_time) { throw uhd::runtime_error( "Board 0 may not be getting a PPS signal!\n" "No PPS detected within the time interval.\n" @@ -628,7 +629,8 @@ public: std::this_thread::sleep_for(std::chrono::milliseconds(1)); } - UHD_LOGGER_INFO("MULTI_USRP") << " 2) set times next pps (synchronously)"; + UHD_LOGGER_INFO("MULTI_USRP") + << " 2) set times next pps (synchronously)"; set_time_next_pps(time_spec, ALL_MBOARDS); std::this_thread::sleep_for(std::chrono::seconds(1)); |