From fa6d52e2a344bb7be7ab03b38ffb3c193be3a84e Mon Sep 17 00:00:00 2001 From: cericks0n <57272211+cericks0n@users.noreply.github.com> Date: Fri, 1 Nov 2019 15:52:38 -0500 Subject: [PATCH] Fix error when period of steady_clock is not nano On systems where std::chrono::steady_clock::period is not std::nano, benchmark tests fail to compile due to trying to convert analysis.samples from a vector of duration to a vector of std::chrono::duration. --- include/internal/benchmark/catch_benchmark.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/internal/benchmark/catch_benchmark.hpp b/include/internal/benchmark/catch_benchmark.hpp index 3c061210..d9887eba 100644 --- a/include/internal/benchmark/catch_benchmark.hpp +++ b/include/internal/benchmark/catch_benchmark.hpp @@ -79,7 +79,7 @@ namespace Catch { }); auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end()); - BenchmarkStats> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; + BenchmarkStats> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; getResultCapture().benchmarkEnded(stats); } CATCH_CATCH_ALL{