aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorTrung N Tran <trung.tran@ettus.com>2018-03-30 15:27:34 -0700
committerMartin Braun <martin.braun@ettus.com>2018-04-02 14:57:21 -0700
commit7964a2ba4c7977161d46b1261560163c106ea324 (patch)
treeab03cc0d284745f93dafa913c61977805ad4f051 /host
parent08245bb92c92c1ac0c81e91c25936b9934e79b57 (diff)
downloaduhd-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)
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/mpmd/mpmd_mboard_impl.cpp5
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)
);
});
}