diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-04-26 14:43:12 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-07-12 11:42:59 -0700 |
commit | 9df9bea6c1812fdc03ef8ace29859f0c64d382d2 (patch) | |
tree | 82d8b04ba9f892d15ff403fd9ed190f0b1f32569 /host/lib/usrp_clock/octoclock | |
parent | 05722dcc51a09084865736651e46326041dd6038 (diff) | |
download | uhd-9df9bea6c1812fdc03ef8ace29859f0c64d382d2.tar.gz uhd-9df9bea6c1812fdc03ef8ace29859f0c64d382d2.tar.bz2 uhd-9df9bea6c1812fdc03ef8ace29859f0c64d382d2.zip |
lib: Purge some use of boost::system_time
These are all timeout loops, which now use
std::chrono::steady_clock::now() to check for timeout events.
Diffstat (limited to 'host/lib/usrp_clock/octoclock')
-rw-r--r-- | host/lib/usrp_clock/octoclock/octoclock_uart.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/usrp_clock/octoclock/octoclock_uart.cpp b/host/lib/usrp_clock/octoclock/octoclock_uart.cpp index 74d324645..7fc455dda 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_uart.cpp +++ b/host/lib/usrp_clock/octoclock/octoclock_uart.cpp @@ -78,7 +78,9 @@ namespace uhd{ std::string octoclock_uart_iface::read_uart(double timeout){ std::string result; - boost::system_time exit_time = boost::get_system_time() + boost::posix_time::milliseconds(long(timeout*1e3)); + const auto exit_time = + std::chrono::steady_clock::now() + + std::chrono::milliseconds(int64_t(timeout*1e3)); while(true) { @@ -93,8 +95,7 @@ namespace uhd{ return result; } } - if (boost::get_system_time() > exit_time) - { + if (std::chrono::steady_clock::now() > exit_time) { break; } std::this_thread::sleep_for(std::chrono::milliseconds(1)); |