diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-09-26 04:52:37 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-09-26 04:52:37 -0700 |
commit | bd7890f1cce5fc5a95c96bc287b6d910fd5b5a42 (patch) | |
tree | 2cdca62c3c788e246f38c2119b89dd171d02e6de | |
parent | 32566b9238c2a35fbb04d3b0e2e33d5860caa317 (diff) | |
parent | 5cb9aef4c3bbc34cd83cebd1be467b2d20a35225 (diff) |
Merge branch 'master' into next
-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", |