From 7f3c4791f7d19d02b7d4515c763b9c2044e96170 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 6 Jul 2010 16:55:59 -0700 Subject: uhd: mimo usrp replace sleep with boost thread sleep (windows fix) --- host/lib/usrp/mimo_usrp.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/host/lib/usrp/mimo_usrp.cpp b/host/lib/usrp/mimo_usrp.cpp index f5441e19d..fd8225074 100644 --- a/host/lib/usrp/mimo_usrp.cpp +++ b/host/lib/usrp/mimo_usrp.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -125,7 +126,8 @@ public: void set_time_unknown_pps(const time_spec_t &time_spec){ std::cout << "Set time with unknown pps edge:" << std::endl; std::cout << " 1) set times next pps (race condition)" << std::endl; - set_time_next_pps(time_spec); sleep(1); + set_time_next_pps(time_spec); + boost::this_thread::sleep(boost::posix_time::seconds(1)); std::cout << " 2) catch seconds rollover at pps edge" << std::endl; time_t last_secs = 0, curr_secs = 0; @@ -135,7 +137,8 @@ public: } std::cout << " 3) set times next pps (synchronously)" << std::endl; - set_time_next_pps(time_spec); sleep(1); + set_time_next_pps(time_spec); + boost::this_thread::sleep(boost::posix_time::seconds(1)); } void issue_stream_cmd(const stream_cmd_t &stream_cmd){ -- cgit v1.2.3