summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-blocks/lib/throttle_impl.cc8
-rw-r--r--gr-blocks/lib/throttle_impl.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/gr-blocks/lib/throttle_impl.cc b/gr-blocks/lib/throttle_impl.cc
index f46decee11..7c24f80ae1 100644
--- a/gr-blocks/lib/throttle_impl.cc
+++ b/gr-blocks/lib/throttle_impl.cc
@@ -57,6 +57,14 @@ namespace gr {
{
}
+ bool
+ throttle_impl::start()
+ {
+ d_start = boost::get_system_time();
+ d_total_samples = 0;
+ return block::start();
+ }
+
void
throttle_impl::set_sample_rate(double rate)
{
diff --git a/gr-blocks/lib/throttle_impl.h b/gr-blocks/lib/throttle_impl.h
index c5e43d7564..6afacbba5d 100644
--- a/gr-blocks/lib/throttle_impl.h
+++ b/gr-blocks/lib/throttle_impl.h
@@ -41,6 +41,9 @@ namespace gr {
throttle_impl(size_t itemsize, double samples_per_sec, bool ignore_tags=true);
~throttle_impl();
+ // Overloading gr::block::start to reset timer
+ bool start();
+
void setup_rpc();
void set_sample_rate(double rate);