Files
dolphin/Source/Core/VideoCommon/FPSCounter.h
T

33 lines
612 B
C++
Raw Normal View History

// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
2014-07-13 13:04:25 +02:00
#include <fstream>
#include "Common/Timer.h"
class FPSCounter
2014-07-02 20:19:08 -04:00
{
2014-07-13 13:04:25 +02:00
public:
unsigned int m_fps;
2014-07-13 13:04:25 +02:00
// Initializes the FPS counter.
FPSCounter();
2014-07-13 13:04:25 +02:00
// Called when a frame is rendered. Returns the value to be displayed on
// screen as the FPS counter (updated every second).
int Update();
private:
unsigned int m_counter;
unsigned int m_fps_last_counter;
Common::Timer m_update_time;
Common::Timer m_render_time;
std::ofstream m_bench_file;
void LogRenderTimeToFile(u64 val);
};