summaryrefslogtreecommitdiff
path: root/usrp2
diff options
context:
space:
mode:
authorTom Rondeau2011-03-15 13:46:02 -0400
committerTom Rondeau2011-03-15 13:46:02 -0400
commit338b01e7b5ecad7e324098a2671d3fa650be035e (patch)
tree247b61f2fbfdadc6ce4f39ad2f637a22cd3163ae /usrp2
parent1ecc511ad673f37498ebc29147c776ca9b4b6490 (diff)
parentb4bd3e47189932b42ce821bb7076fce811b3e3eb (diff)
downloadgnuradio-338b01e7b5ecad7e324098a2671d3fa650be035e.tar.gz
gnuradio-338b01e7b5ecad7e324098a2671d3fa650be035e.tar.bz2
gnuradio-338b01e7b5ecad7e324098a2671d3fa650be035e.zip
Merge branch 'next' of gnuradio.org:gnuradio into next
Diffstat (limited to 'usrp2')
-rw-r--r--usrp2/host/lib/control.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/usrp2/host/lib/control.cc b/usrp2/host/lib/control.cc
index 33a95c078..3b5533eb8 100644
--- a/usrp2/host/lib/control.cc
+++ b/usrp2/host/lib/control.cc
@@ -27,6 +27,9 @@
#include <iostream>
#include <gruel/thread.h>
+#include <boost/date_time/posix_time/posix_time.hpp>
+namespace pt = boost::posix_time;
+
namespace usrp2 {
pending_reply::pending_reply(unsigned int rid, void *buffer, size_t len)
@@ -44,10 +47,9 @@ namespace usrp2 {
pending_reply::wait_for_completion(double secs)
{
gruel::scoped_lock l(d_mutex);
- boost::system_time to(gruel::get_new_timeout(secs));
while (!d_complete) {
- if (!d_cond.timed_wait(l, to))
+ if (!d_cond.timed_wait(l, pt::milliseconds(long(secs*1e3))))
return 0; // timed out
}