MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / resolution

Function resolution

extlibs/catch/include/catch/catch.hpp:6877–6889  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 4

reserveMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected