MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / Stop

Method Stop

Source/external/benchmark.h:35–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 }
34
35 void Stop()
36 {
37 auto endTimepoint = std::chrono::high_resolution_clock::now();
38
39 long long start = std::chrono::time_point_cast<std::chrono::microseconds>(m_StartTimepoint).time_since_epoch().count();
40 long long end = std::chrono::time_point_cast<std::chrono::microseconds>(endTimepoint).time_since_epoch().count();
41
42 auto duration = start - end;
43 double ms = (duration * 0.001) * -1;
44
45 GameToolbox::log("TIMER [{}]|[{}]", m_Name, ms);
46
47 m_Stopped = true;
48 }
49private:
50 const char* m_Name;
51 std::chrono::time_point<std::chrono::high_resolution_clock> m_StartTimepoint;

Callers

nothing calls this directly

Calls 1

logFunction · 0.85

Tested by

no test coverage detected