summaryrefslogtreecommitdiffstats
path: root/src/core/perf_stats.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-01 03:50:12 +0200
committerGitHub <noreply@github.com>2018-09-01 03:50:12 +0200
commit1c05c06e048c0471653275dcb00f391acbfd6324 (patch)
tree8eda46d4aac083d23a52223e1a3fc46bc6690a6c /src/core/perf_stats.h
parentMerge pull request #1205 from bunnei/improve-rasterizer-cache-2 (diff)
parentcore/core: Replace includes with forward declarations where applicable (diff)
downloadyuzu-1c05c06e048c0471653275dcb00f391acbfd6324.tar
yuzu-1c05c06e048c0471653275dcb00f391acbfd6324.tar.gz
yuzu-1c05c06e048c0471653275dcb00f391acbfd6324.tar.bz2
yuzu-1c05c06e048c0471653275dcb00f391acbfd6324.tar.lz
yuzu-1c05c06e048c0471653275dcb00f391acbfd6324.tar.xz
yuzu-1c05c06e048c0471653275dcb00f391acbfd6324.tar.zst
yuzu-1c05c06e048c0471653275dcb00f391acbfd6324.zip
Diffstat (limited to 'src/core/perf_stats.h')
-rw-r--r--src/core/perf_stats.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/perf_stats.h b/src/core/perf_stats.h
index 6e4619701..222ac1a63 100644
--- a/src/core/perf_stats.h
+++ b/src/core/perf_stats.h
@@ -10,6 +10,17 @@
namespace Core {
+struct PerfStatsResults {
+ /// System FPS (LCD VBlanks) in Hz
+ double system_fps;
+ /// Game FPS (GSP frame submissions) in Hz
+ double game_fps;
+ /// Walltime per system frame, in seconds, excluding any waits
+ double frametime;
+ /// Ratio of walltime / emulated time elapsed
+ double emulation_speed;
+};
+
/**
* Class to manage and query performance/timing statistics. All public functions of this class are
* thread-safe unless stated otherwise.
@@ -18,22 +29,11 @@ class PerfStats {
public:
using Clock = std::chrono::high_resolution_clock;
- struct Results {
- /// System FPS (LCD VBlanks) in Hz
- double system_fps;
- /// Game FPS (GSP frame submissions) in Hz
- double game_fps;
- /// Walltime per system frame, in seconds, excluding any waits
- double frametime;
- /// Ratio of walltime / emulated time elapsed
- double emulation_speed;
- };
-
void BeginSystemFrame();
void EndSystemFrame();
void EndGameFrame();
- Results GetAndResetStats(std::chrono::microseconds current_system_time_us);
+ PerfStatsResults GetAndResetStats(std::chrono::microseconds current_system_time_us);
/**
* Gets the ratio between walltime and the emulated time of the previous system frame. This is