Better arg name for run_for_at_least

This commit is contained in:
Martin Hořeňovský 2021-08-03 16:35:29 +02:00
parent 79c2daa4a0
commit 77df08b44d
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -43,8 +43,11 @@ namespace Catch {
void throw_optimized_away_error(); void throw_optimized_away_error();
template <typename Clock, typename Fun> template <typename Clock, typename Fun>
TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) { TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>>
auto iters = seed; run_for_at_least(ClockDuration<Clock> how_long,
const int initial_iterations,
Fun&& fun) {
auto iters = initial_iterations;
while (iters < (1 << 30)) { while (iters < (1 << 30)) {
auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>()); auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());