MCPcopy Create free account
hub / github.com/Niko1221/Strata / ms_since

Function ms_since

engine/src/split/src/batch.cpp:16–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14// priors: a chain draft stands 70% of the time (as alone), a lookup 80% (a match tends to run on)
15constexpr double CHAIN_PRIOR = 0.7, LOOKUP_PRIOR = 0.8;
16double ms_since(std::chrono::steady_clock::time_point t0) {
17 return std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - t0).count();
18}
19std::vector<int> tail(const std::vector<int>& v, int n) {
20 return std::vector<int>(v.size() > (size_t) n ? v.end() - n : v.begin(), v.end());
21}

Callers 1

windowMethod · 0.70

Calls 2

nowFunction · 0.50
countMethod · 0.45

Tested by

no test coverage detected