diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-02-20 03:18:26 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-02-27 02:22:03 +0100 |
commit | 92c8bd4b1f650438274e50303a6d3f668924d071 (patch) | |
tree | 0c9e162129dabd2424ee329b51f5765a73f6a494 /src/core/perf_stats.h | |
parent | Add performance statistics to status bar (diff) | |
download | yuzu-92c8bd4b1f650438274e50303a6d3f668924d071.tar yuzu-92c8bd4b1f650438274e50303a6d3f668924d071.tar.gz yuzu-92c8bd4b1f650438274e50303a6d3f668924d071.tar.bz2 yuzu-92c8bd4b1f650438274e50303a6d3f668924d071.tar.lz yuzu-92c8bd4b1f650438274e50303a6d3f668924d071.tar.xz yuzu-92c8bd4b1f650438274e50303a6d3f668924d071.tar.zst yuzu-92c8bd4b1f650438274e50303a6d3f668924d071.zip |
Diffstat (limited to 'src/core/perf_stats.h')
-rw-r--r-- | src/core/perf_stats.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/perf_stats.h b/src/core/perf_stats.h index 566a1419a..8a03c511a 100644 --- a/src/core/perf_stats.h +++ b/src/core/perf_stats.h @@ -30,11 +30,19 @@ public: Results GetAndResetStats(u64 current_system_time_us); + /** + * Gets the ratio between walltime and the emulated time of the previous system frame. This is + * useful for scaling inputs or outputs moving between the two time domains. + */ + double GetLastFrameTimeScale(); + private: Clock::time_point reset_point = Clock::now(); - Clock::time_point frame_begin; + Clock::time_point frame_begin = reset_point; + Clock::time_point previous_frame_end = reset_point; Clock::duration accumulated_frametime = Clock::duration::zero(); + Clock::duration previous_frame_length = Clock::duration::zero(); u64 reset_point_system_us = 0; u32 system_frames = 0; u32 game_frames = 0; |