From 717a51b34a3cbaabc9956cb1185483a0423bf628 Mon Sep 17 00:00:00 2001 From: Lars Amsel Date: Mon, 4 May 2020 08:15:43 +0200 Subject: uhd: Replaced deprecated usage of boost timer with std::chrono replaced boost::timer by std::chrono::steady_timer to measure time interval --- host/utils/converter_benchmark.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'host/utils/converter_benchmark.cpp') diff --git a/host/utils/converter_benchmark.cpp b/host/utils/converter_benchmark.cpp index f981455ac..cf266dfb2 100644 --- a/host/utils/converter_benchmark.cpp +++ b/host/utils/converter_benchmark.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -200,11 +200,13 @@ double run_benchmark(converter::sptr conv, size_t n_items, size_t iterations) { - boost::timer benchmark_timer; + auto start = std::chrono::steady_clock::now(); for (size_t i = 0; i < iterations; i++) { conv->conv(input_buf_refs, output_buf_refs, n_items); } - return benchmark_timer.elapsed(); + auto stop = std::chrono::steady_clock::now(); + std::chrono::duration duration = stop - start; + return duration.count(); } template -- cgit v1.2.3