summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcericks0n <57272211+cericks0n@users.noreply.github.com>2019-11-01 15:52:38 -0500
committerGitHub <noreply@github.com>2019-11-01 15:52:38 -0500
commitfa6d52e2a344bb7be7ab03b38ffb3c193be3a84e (patch)
tree678642a3f74d0e98548479adac1186ac4ae2509a
parent5ac348cd6e788abbf18139289ae8f4722ab1ebe8 (diff)
downloadcatch2-fa6d52e2a344bb7be7ab03b38ffb3c193be3a84e.tar.gz
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<double, clock::period> to a vector of std::chrono::duration<double, std::nano>.
-rw-r--r--include/internal/benchmark/catch_benchmark.hpp2
1 files changed, 1 insertions, 1 deletions
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<std::chrono::duration<double, std::nano>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
+ BenchmarkStats<FloatDuration<Clock>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
getResultCapture().benchmarkEnded(stats);
} CATCH_CATCH_ALL{