MCPcopy Create free account
hub / github.com/comaps/comaps / SetFrameTime

Method SetFrameTime

libs/drape_frontend/gui/scale_fps_helper.hpp:21–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 bool IsPaused() const { return m_isPaused; }
20
21 void SetFrameTime(double frameTime, bool isActiveFrame)
22 {
23 m_isPaused = !isActiveFrame;
24 m_framesCounter++;
25 m_aggregatedFrameTime += frameTime;
26
27 double constexpr kAggregationPeriod = 0.5;
28 if (m_isPaused || m_fpsAggregationTimer.ElapsedSeconds() >= kAggregationPeriod)
29 {
30 m_frameTime = m_aggregatedFrameTime / m_framesCounter;
31 m_aggregatedFrameTime = 0.0;
32 m_framesCounter = 0;
33 m_fpsAggregationTimer.Reset();
34 }
35 }
36
37 int GetScale() const { return m_scale; }
38 void SetScale(int scale) { m_scale = scale; }

Callers 1

RenderFrameMethod · 0.80

Calls 2

ElapsedSecondsMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected