| 7031 | namespace Detail { |
| 7032 | template <typename Clock> |
| 7033 | std::vector<double> resolution(int k) { |
| 7034 | std::vector<TimePoint<Clock>> times; |
| 7035 | times.reserve(k + 1); |
| 7036 | std::generate_n(std::back_inserter(times), k + 1, now<Clock>{}); |
| 7037 | |
| 7038 | std::vector<double> deltas; |
| 7039 | deltas.reserve(k); |
| 7040 | std::transform(std::next(times.begin()), times.end(), times.begin(), |
| 7041 | std::back_inserter(deltas), |
| 7042 | [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); }); |
| 7043 | |
| 7044 | return deltas; |
| 7045 | } |
| 7046 | |
| 7047 | const auto warmup_iterations = 10000; |
| 7048 | const auto warmup_time = std::chrono::milliseconds(100); |