summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/c++
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-01-29 11:53:37 +0100
committerMartin Braun <martin@gnuradio.org>2021-02-05 07:48:06 -0800
commit7e43e0a149bf7889531297916dbf1482bab76e50 (patch)
treef23a471a052a3a8f3dfc65efa6c336d78073db68 /gr-uhd/examples/c++
parent6df5b3a6e5397eb0b08dfabfcd78d96aea46f447 (diff)
uhd: Remove (almost all) occurrences of Boost
The following usages of Boost remain: - boost::format - boost::program_options for the examples - Boost thread interruption directives to interact with GNU Radio runtime Signed-off-by: Martin Braun <martin@gnuradio.org>
Diffstat (limited to 'gr-uhd/examples/c++')
-rw-r--r--gr-uhd/examples/c++/tag_source_demo.h1
-rw-r--r--gr-uhd/examples/c++/tags_demo.cc10
2 files changed, 6 insertions, 5 deletions
diff --git a/gr-uhd/examples/c++/tag_source_demo.h b/gr-uhd/examples/c++/tag_source_demo.h
index bcd5c970c2..64a61c8219 100644
--- a/gr-uhd/examples/c++/tag_source_demo.h
+++ b/gr-uhd/examples/c++/tag_source_demo.h
@@ -9,7 +9,6 @@
#include <gnuradio/io_signature.h>
#include <gnuradio/sync_block.h>
-#include <boost/format.hpp>
#include <complex>
#include <iostream>
diff --git a/gr-uhd/examples/c++/tags_demo.cc b/gr-uhd/examples/c++/tags_demo.cc
index f900682653..dfc1a90c21 100644
--- a/gr-uhd/examples/c++/tags_demo.cc
+++ b/gr-uhd/examples/c++/tags_demo.cc
@@ -13,13 +13,15 @@
#include <gnuradio/uhd/usrp_sink.h>
#include <gnuradio/uhd/usrp_source.h>
#include <uhd/utils/safe_main.hpp>
-#include <boost/make_shared.hpp>
+#include <boost/format.hpp>
#include <boost/program_options.hpp>
-#include <boost/thread/thread.hpp> //sleep
+#include <chrono>
#include <csignal>
#include <iostream>
+#include <thread>
namespace po = boost::program_options;
+using namespace std::chrono_literals;
/***********************************************************************
* Signal handlers
@@ -127,8 +129,8 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
//------------------------------------------------------------------
std::signal(SIGINT, &sig_int_handler);
std::cout << "press ctrl + c to exit" << std::endl;
- while (not stop_signal_called) {
- boost::this_thread::sleep(boost::posix_time::milliseconds(100));
+ while (!stop_signal_called) {
+ std::this_thread::sleep_for(100ms);
}
//------------------------------------------------------------------