When I run the program at 60 fps, I get 0.016 seconds per frame most of the time, then 0.017 s once every few frames. A similar thing happens for 30 fps, varying between 0.033 and 0.034 seconds per frame.
Should my framerate and frame duration be stable? Even when nothing different is happening in each frame?
while (m_bRunning) { m_Timer.Start(); m_frameStart = SDL_GetTicks(); m_frameCount += 1; HandleEvent(e); Update(); Draw(); m_Timer.Pause(); if(m_frameDelay >= m_Timer.GetTicks()) { SDL_Delay(m_frameDelay - m_Timer.GetTicks()); } m_deltaTime = (double(SDL_GetTicks() - m_frameStart)/1000.f); return m_bRunning; }