mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
VideoCommon: Improve precision of FPS counter
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "Common/Timer.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
class FPSCounter
|
||||
{
|
||||
@ -17,14 +17,12 @@ public:
|
||||
// Called when a frame is rendered (updated every second).
|
||||
void Update();
|
||||
|
||||
unsigned int GetFPS() const { return m_fps; }
|
||||
float GetFPS() const { return m_fps; }
|
||||
private:
|
||||
unsigned int m_fps = 0;
|
||||
unsigned int m_counter = 0;
|
||||
unsigned int m_fps_last_counter = 0;
|
||||
Common::Timer m_update_time;
|
||||
|
||||
Common::Timer m_render_time;
|
||||
u64 m_last_time = 0;
|
||||
u64 m_time_since_update = 0;
|
||||
u32 m_frame_counter = 0;
|
||||
float m_fps = 0;
|
||||
std::ofstream m_bench_file;
|
||||
|
||||
void LogRenderTimeToFile(u64 val);
|
||||
|
Reference in New Issue
Block a user