aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2014-08-18 23:05:48 +0200
committerMartin Braun <martin.braun@ettus.com>2014-08-18 23:05:48 +0200
commit83249208bdc17603358019be0910d0a74ec41085 (patch)
tree1520ee3b13e2e42776faa2803b15627b050ac7fd /host/lib/usrp/multi_usrp.cpp
parent90fd966e25b0947483defbe5e3a7247e00c06619 (diff)
parent9bf965c804022e876c4ca5382db4849257c6222d (diff)
downloaduhd-83249208bdc17603358019be0910d0a74ec41085.tar.gz
uhd-83249208bdc17603358019be0910d0a74ec41085.tar.bz2
uhd-83249208bdc17603358019be0910d0a74ec41085.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 7d19fcb8b..388cf03fa 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -394,17 +394,19 @@ public:
void set_time_unknown_pps(const time_spec_t &time_spec){
UHD_MSG(status) << " 1) catch time transition at pps edge" << std::endl;
- time_spec_t time_start = get_time_now();
+ boost::system_time end_time = boost::get_system_time() + boost::posix_time::milliseconds(1100);
time_spec_t time_start_last_pps = get_time_last_pps();
- while(true){
- if (get_time_last_pps() != time_start_last_pps) break;
- if ((get_time_now() - time_start) > time_spec_t(1.1)){
+ while (time_start_last_pps == get_time_last_pps())
+ {
+ if (boost::get_system_time() > end_time)
+ {
throw uhd::runtime_error(
"Board 0 may not be getting a PPS signal!\n"
"No PPS detected within the time interval.\n"
"See the application notes for your device.\n"
);
}
+ boost::this_thread::sleep(boost::posix_time::milliseconds(1));
}
UHD_MSG(status) << " 2) set times next pps (synchronously)" << std::endl;