Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/benchmark
diff options
context:
space:
mode:
authorcericks0n2019-11-01 15:52:38 -0500
committerMartin Hořeňovský2020-02-12 19:20:41 +0100
commit4f0de7bbadc601a3c8a4457251d934213e61e902 (patch)
tree55d4690526b1e2f6f1e1ad1c11874591e4974eca /src/catch2/benchmark
parent21b24e83262b6ba2b70011ee7c2625ea057988f4 (diff)
downloadcatch3-4f0de7bbadc601a3c8a4457251d934213e61e902.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>.
Diffstat (limited to 'src/catch2/benchmark')
-rw-r--r--src/catch2/benchmark/catch_benchmark.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/benchmark/catch_benchmark.hpp b/src/catch2/benchmark/catch_benchmark.hpp
index aef42c90..a6ffcf7c 100644
--- a/src/catch2/benchmark/catch_benchmark.hpp
+++ b/src/catch2/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{