aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/benchmark_rate.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-08-20 19:19:49 -0700
committerJosh Blum <josh@joshknows.com>2013-08-20 19:19:49 -0700
commit6de009cc792966595d18737ed9d3658734fc801e (patch)
tree74c5ab70eee8e622a5292c8502c7bd57d0fa8963 /host/examples/benchmark_rate.cpp
parent823273c63247e764bafe2bb9ad651bfbf5812c5b (diff)
downloaduhd-6de009cc792966595d18737ed9d3658734fc801e.tar.gz
uhd-6de009cc792966595d18737ed9d3658734fc801e.tar.bz2
uhd-6de009cc792966595d18737ed9d3658734fc801e.zip
uhd: benchmark use builtin samp calculation
Diffstat (limited to 'host/examples/benchmark_rate.cpp')
-rw-r--r--host/examples/benchmark_rate.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp
index 66424c85d..02e5ef60a 100644
--- a/host/examples/benchmark_rate.cpp
+++ b/host/examples/benchmark_rate.cpp
@@ -26,8 +26,6 @@
#include <complex>
#include <cstdlib>
-#define myllround(x) ((long long)((x) + 0.5))
-
namespace po = boost::program_options;
/***********************************************************************
@@ -74,7 +72,7 @@ void benchmark_rx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &rx_c
case uhd::rx_metadata_t::ERROR_CODE_NONE:
if (had_an_overflow){
had_an_overflow = false;
- num_dropped_samps += myllround((md.time_spec - last_time).get_real_secs()*rate);
+ num_dropped_samps += (md.time_spec - last_time).to_ticks(rate);
}
break;