diff options
author | Trung N Tran <trung.tran@ettus.com> | 2018-03-30 15:27:34 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-04-02 14:57:21 -0700 |
commit | 7964a2ba4c7977161d46b1261560163c106ea324 (patch) | |
tree | ab03cc0d284745f93dafa913c61977805ad4f051 | |
parent | 08245bb92c92c1ac0c81e91c25936b9934e79b57 (diff) | |
download | uhd-7964a2ba4c7977161d46b1261560163c106ea324.tar.gz uhd-7964a2ba4c7977161d46b1261560163c106ea324.tar.bz2 uhd-7964a2ba4c7977161d46b1261560163c106ea324.zip |
mpmd: tighten reclaiming time.
Reclaming interval was exec_time(claim+dump_logs)+MPMD_RECLAIM_INTERNVAL; this change will
MAX(exec_time(claim+dump_logs),MPM_RECLAIM_INTERVAL)
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_mboard_impl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp index 8cad29f6b..023d97381 100644 --- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp @@ -500,12 +500,13 @@ uhd::task::sptr mpmd_mboard_impl::claim_device_and_make_task( UHD_LOG_TRACE("MPMD", "Received claim token " << rpc_token); rpc->set_token(rpc_token); return uhd::task::make([this] { + auto now = std::chrono::steady_clock::now(); if (not this->claim()) { throw uhd::value_error("mpmd device reclaiming loop failed!"); }; this->dump_logs(); - std::this_thread::sleep_for( - std::chrono::milliseconds(MPMD_RECLAIM_INTERVAL_MS) + std::this_thread::sleep_until( + now + std::chrono::milliseconds(MPMD_RECLAIM_INTERVAL_MS) ); }); } |