diff options
| author | cericks0n | 2019-11-01 15:52:38 -0500 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-12 19:20:41 +0100 |
| commit | 4f0de7bbadc601a3c8a4457251d934213e61e902 (patch) | |
| tree | 55d4690526b1e2f6f1e1ad1c11874591e4974eca /src | |
| parent | 21b24e83262b6ba2b70011ee7c2625ea057988f4 (diff) | |
| download | catch3-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')
| -rw-r--r-- | src/catch2/benchmark/catch_benchmark.hpp | 2 |
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{ |