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