aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-04 20:21:09 -0700
committerJosh Blum <josh@joshknows.com>2010-07-05 13:49:04 -0700
commit549a0170a409904f123a4eef975362978ca62bf3 (patch)
tree7390bf1eb9bba9418a9c86f761f55f2900c2f484 /host/lib
parent5e14653f241070791d46893e68e341357e040add (diff)
downloaduhd-549a0170a409904f123a4eef975362978ca62bf3.tar.gz
uhd-549a0170a409904f123a4eef975362978ca62bf3.tar.bz2
uhd-549a0170a409904f123a4eef975362978ca62bf3.zip
uhd: added get time now call to simple and mimo usrp
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/mimo_usrp.cpp10
-rw-r--r--host/lib/usrp/simple_usrp.cpp4
2 files changed, 9 insertions, 5 deletions
diff --git a/host/lib/usrp/mimo_usrp.cpp b/host/lib/usrp/mimo_usrp.cpp
index bd7753d09..440aaf9f6 100644
--- a/host/lib/usrp/mimo_usrp.cpp
+++ b/host/lib/usrp/mimo_usrp.cpp
@@ -63,11 +63,6 @@ public:
BOOST_FOREACH(wax::obj mboard, _mboards){
mboard[MBOARD_PROP_CLOCK_CONFIG] = clock_config;
}
-
- //set the times to zero at the next pps and sleep
- this->set_time_next_pps(time_spec_t(0, 0));
- sleep(1);
-
}
~mimo_usrp_impl(void){
@@ -115,6 +110,11 @@ public:
/*******************************************************************
* Misc
******************************************************************/
+ time_spec_t get_time_now(void){
+ //the time on the first mboard better be the same on all
+ return _mboards.front()[MBOARD_PROP_TIME_NOW].as<time_spec_t>();
+ }
+
void set_time_next_pps(const time_spec_t &time_spec){
BOOST_FOREACH(wax::obj mboard, _mboards){
mboard[MBOARD_PROP_TIME_NEXT_PPS] = time_spec;
diff --git a/host/lib/usrp/simple_usrp.cpp b/host/lib/usrp/simple_usrp.cpp
index 4a5171cf7..56e82d7ee 100644
--- a/host/lib/usrp/simple_usrp.cpp
+++ b/host/lib/usrp/simple_usrp.cpp
@@ -86,6 +86,10 @@ public:
/*******************************************************************
* Misc
******************************************************************/
+ time_spec_t get_time_now(void){
+ return _mboard[MBOARD_PROP_TIME_NOW].as<time_spec_t>();
+ }
+
void set_time_now(const time_spec_t &time_spec){
_mboard[MBOARD_PROP_TIME_NOW] = time_spec;
}