summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-02-27 02:13:12 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-02-27 02:22:04 +0100
commit174464a87f2e1709597bc1e0cb08c877487a771b (patch)
tree28cc23a81983f85040744512648291acc9e0f5af
parentQt: Tweak status bar styling (diff)
downloadyuzu-174464a87f2e1709597bc1e0cb08c877487a771b.tar
yuzu-174464a87f2e1709597bc1e0cb08c877487a771b.tar.gz
yuzu-174464a87f2e1709597bc1e0cb08c877487a771b.tar.bz2
yuzu-174464a87f2e1709597bc1e0cb08c877487a771b.tar.lz
yuzu-174464a87f2e1709597bc1e0cb08c877487a771b.tar.xz
yuzu-174464a87f2e1709597bc1e0cb08c877487a771b.tar.zst
yuzu-174464a87f2e1709597bc1e0cb08c877487a771b.zip
-rw-r--r--src/core/perf_stats.cpp2
-rw-r--r--src/core/perf_stats.h17
2 files changed, 14 insertions, 5 deletions
diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp
index eb59a1332..2cdfb9ded 100644
--- a/src/core/perf_stats.cpp
+++ b/src/core/perf_stats.cpp
@@ -76,7 +76,7 @@ double PerfStats::GetLastFrameTimeScale() {
void FrameLimiter::DoFrameLimiting(u64 current_system_time_us) {
// Max lag caused by slow frames. Can be adjusted to compensate for too many slow frames. Higher
- // values increases time needed to limit frame rate after spikes.
+ // values increase the time needed to recover and limit framerate again after spikes.
constexpr microseconds MAX_LAG_TIME_US = 25ms;
if (!Settings::values.toggle_framelimit) {
diff --git a/src/core/perf_stats.h b/src/core/perf_stats.h
index b03adab68..362b205c8 100644
--- a/src/core/perf_stats.h
+++ b/src/core/perf_stats.h
@@ -44,15 +44,24 @@ public:
private:
std::mutex object_mutex;
+ /// Point when the cumulative counters were reset
Clock::time_point reset_point = Clock::now();
+ /// System time when the cumulative counters were reset
+ u64 reset_point_system_us = 0;
- Clock::time_point frame_begin = reset_point;
- Clock::time_point previous_frame_end = reset_point;
+ /// Cumulative duration (excluding v-sync/frame-limiting) of frames since last reset
Clock::duration accumulated_frametime = Clock::duration::zero();
- Clock::duration previous_frame_length = Clock::duration::zero();
- u64 reset_point_system_us = 0;
+ /// Cumulative number of system frames (LCD VBlanks) presented since last reset
u32 system_frames = 0;
+ /// Cumulative number of game frames (GSP frame submissions) since last reset
u32 game_frames = 0;
+
+ /// Point when the previous system frame ended
+ Clock::time_point previous_frame_end = reset_point;
+ /// Point when the current system frame began
+ Clock::time_point frame_begin = reset_point;
+ /// Total visible duration (including frame-limiting, etc.) of the previous system frame
+ Clock::duration previous_frame_length = Clock::duration::zero();
};
class FrameLimiter {