33 m_mediumFrameDelay = 0;
38 m_mediumFrameDelay = 0;
49 if(now - m_lastFrame < m_bestFrameDelay)
59 m_frameDelaySum += now - m_lastFrame;
66 ticks_t delta = now - m_lastPartialFpsUpdate;
67 if(delta > 41000 && m_partialFrames > 0) {
68 m_partialFps = m_partialFrames / (delta / 1000000.0f);
69 m_lastPartialFpsUpdate = now;
73 delta = now - m_lastFpsUpdate;
74 if(delta >= 1000000) {
77 m_mediumFrameDelay = m_frameDelaySum / m_frames;
79 m_mediumFrameDelay = 0;
80 m_lastFpsUpdate = now;
92 maxFps = stdext::clamp<int>(maxFps, 0, 1000);
95 m_bestFrameDelay = 1000000 / maxFps;
112 if(m_bestFrameDelay > 0)
113 return ((m_bestFrameDelay - std::abs(m_bestFrameDelay - m_mediumFrameDelay)) * 100.0f) / (float)m_bestFrameDelay;