MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ProfileSample

Function ProfileSample

engine/Poseidon/Dev/Debug/DebugOverlay.cpp:845–853  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

843float s_frameMs[kProfHistory] = {};
844int s_frameMsHead = 0;
845
846void ProfileSample()
847{
848 if (!GEngine)
849 return;
850 const uint32_t lastMs = GEngine->GetLastFrameDuration();
851 const float ms = static_cast<float>(lastMs);
852 s_frameMs[s_frameMsHead] = ms;
853 s_frameMsHead = (s_frameMsHead + 1) % kProfHistory;
854}
855
856float ProfileFps()

Callers 1

DrawProfileTabFunction · 0.85

Calls 1

GetLastFrameDurationMethod · 0.80

Tested by

no test coverage detected