MCPcopy Create free account
hub / github.com/covscript/covscript / measure

Method measure

sources/instance/type_ext.cpp:105–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 }
104
105 static timer_t measure(time_unit unit, const std::function<void()> &func)
106 {
107 timer_t begin(0), end(0);
108 begin = time(unit);
109 func();
110 end = time(unit);
111 return end - begin;
112 }
113 };
114
115 std::chrono::time_point<std::chrono::high_resolution_clock> timer::m_timer(std::chrono::high_resolution_clock::now());

Callers

nothing calls this directly

Calls 1

timeFunction · 0.70

Tested by

no test coverage detected