1 #include "benchmark/benchmark.h"
16 std::chrono::milliseconds sleep_duration(
state.range(0));
18 std::this_thread::sleep_for(
19 std::chrono::duration_cast<std::chrono::nanoseconds>(sleep_duration));
51 for (
int i = 0;
i < 10; ++
i) {
61 static bool invoked_before =
false;
62 assert(!invoked_before);
63 invoked_before =
true;
66 assert(
state.max_iterations == 42);
67 size_t actual_iterations = 0;
70 assert(
state.iterations() ==
state.max_iterations);
71 assert(
state.iterations() == 42);