| 7099 | namespace Detail { |
| 7100 | template <typename Clock> |
| 7101 | std::vector<double> resolution(int k) { |
| 7102 | std::vector<TimePoint<Clock>> times; |
| 7103 | times.reserve(k + 1); |
| 7104 | std::generate_n(std::back_inserter(times), k + 1, now<Clock>{}); |
| 7105 | |
| 7106 | std::vector<double> deltas; |
| 7107 | deltas.reserve(k); |
| 7108 | std::transform(std::next(times.begin()), times.end(), times.begin(), |
| 7109 | std::back_inserter(deltas), |
| 7110 | [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); }); |
| 7111 | |
| 7112 | return deltas; |
| 7113 | } |
| 7114 | |
| 7115 | const auto warmup_iterations = 10000; |
| 7116 | const auto warmup_time = std::chrono::milliseconds(100); |