diff options
Diffstat (limited to 'lib/hackrf/hackrf_source_c.cc')
-rw-r--r-- | lib/hackrf/hackrf_source_c.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/hackrf/hackrf_source_c.cc b/lib/hackrf/hackrf_source_c.cc index 677bf36..a7689b2 100644 --- a/lib/hackrf/hackrf_source_c.cc +++ b/lib/hackrf/hackrf_source_c.cc @@ -34,6 +34,7 @@ #include <boost/format.hpp> #include <boost/detail/endian.hpp> #include <boost/algorithm/string.hpp> +#include <boost/thread/thread.hpp> #include <stdexcept> #include <iostream> @@ -276,7 +277,8 @@ bool hackrf_source_c::stop() while ( hackrf_is_streaming( _dev ) ); /* FIXME: hackrf_stop_rx should wait until the device is ready for a start */ - usleep(100000); /* required if we want to immediately start() again */ + /* required if we want to immediately start() again */ + boost::this_thread::sleep( boost::posix_time::milliseconds(100) ); return ! (bool) hackrf_is_streaming( _dev ); } |