mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
uhd: Replaced deprecated usage of boost timer with std::chrono
replaced boost::timer by std::chrono::steady_timer to measure time interval
This commit is contained in:
parent
91cd945c3e
commit
ea137aa3f0
@ -14,7 +14,7 @@
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
#include <boost/timer.hpp>
|
||||
#include <chrono>
|
||||
#include <complex>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
@ -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<double> duration = stop - start;
|
||||
return duration.count();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user