| 6875 | namespace Detail { |
| 6876 | template <typename Clock> |
| 6877 | std::vector<double> resolution(int k) { |
| 6878 | std::vector<TimePoint<Clock>> times; |
| 6879 | times.reserve(k + 1); |
| 6880 | std::generate_n(std::back_inserter(times), k + 1, now<Clock>{}); |
| 6881 | |
| 6882 | std::vector<double> deltas; |
| 6883 | deltas.reserve(k); |
| 6884 | std::transform(std::next(times.begin()), times.end(), times.begin(), |
| 6885 | std::back_inserter(deltas), |
| 6886 | [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); }); |
| 6887 | |
| 6888 | return deltas; |
| 6889 | } |
| 6890 | |
| 6891 | const auto warmup_iterations = 10000; |
| 6892 | const auto warmup_time = std::chrono::milliseconds(100); |