diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-09-26 04:50:51 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-09-26 04:50:51 -0700 |
commit | 5cb9aef4c3bbc34cd83cebd1be467b2d20a35225 (patch) | |
tree | ed470dd718c8048a715d63ebf040d60ce9459b24 | |
parent | 7217c6cc3d4dc81eaadde288826825a275c951ec (diff) | |
parent | 807bba681d56589d2f02cd6227181d9abc796e17 (diff) |
Merge branch 'maint'
-rw-r--r-- | gnuradio-runtime/lib/top_block.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gnuradio-runtime/lib/top_block.cc b/gnuradio-runtime/lib/top_block.cc index 8918a8f12d..7d135083dd 100644 --- a/gnuradio-runtime/lib/top_block.cc +++ b/gnuradio-runtime/lib/top_block.cc @@ -59,6 +59,17 @@ namespace gr { void top_block::start(int max_noutput_items) { +#ifdef GNURADIO_HRT_USE_CLOCK_GETTIME + std::string initial_clock = prefs::singleton()->get_string("PerfCounters", "clock", "thread"); + if(initial_clock.compare("thread") == 0){ + gr::high_res_timer_source = CLOCK_THREAD_CPUTIME_ID; + } else if(initial_clock.compare("monotonic") == 0){ + gr::high_res_timer_source = CLOCK_MONOTONIC; + } else { + throw std::runtime_error("bad argument for PerfCounters.clock!"); + } +#endif + d_impl->start(max_noutput_items); if(prefs::singleton()->get_bool("ControlPort", "on", false)) { @@ -186,14 +197,6 @@ namespace gr { } #ifdef GNURADIO_HRT_USE_CLOCK_GETTIME - std::string initial_clock = prefs::singleton()->get_string("PerfCounters", "clock", "thread"); - if(initial_clock.compare("thread") == 0){ - gr::high_res_timer_source = CLOCK_THREAD_CPUTIME_ID; - } else if(initial_clock.compare("monotonic") == 0){ - gr::high_res_timer_source = CLOCK_MONOTONIC; - } else { - throw std::runtime_error("bad argument for PerfCounters.clock!"); - } add_rpc_variable( rpcbasic_sptr(new rpcbasic_register_variable_rw<int>( alias(), "perfcounter_clock", |