From c75ae6c585f651a1b7c162c2e1ecccd22a1c587d Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 19 Feb 2017 14:34:47 -0800 Subject: Add performance statistics to status bar --- src/core/core.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index 17572a74f..3efc20c3d 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -6,9 +6,10 @@ #include #include - #include "common/common_types.h" +#include "common/synchronized_wrapper.h" #include "core/memory.h" +#include "core/perf_stats.h" class EmuWindow; class ARM_Interface; @@ -83,6 +84,8 @@ public: /// Prepare the core emulation for a reschedule void PrepareReschedule(); + PerfStats::Results GetAndResetPerfStats(); + /** * Gets a reference to the emulated CPU. * @returns A reference to the emulated CPU. @@ -91,6 +94,8 @@ public: return *cpu_core; } + Common::SynchronizedWrapper perf_stats; + private: /** * Initialize the emulated system. -- cgit v1.2.3 From b285c2a4ed29a126b5bcfe46e2784bd1870bdf82 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Mon, 20 Feb 2017 13:56:58 -0800 Subject: Core: Make PerfStats internally locked More ergonomic to use and will be required for upcoming changes. --- src/core/core.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index 3efc20c3d..db3b98a05 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -7,7 +7,6 @@ #include #include #include "common/common_types.h" -#include "common/synchronized_wrapper.h" #include "core/memory.h" #include "core/perf_stats.h" @@ -94,7 +93,7 @@ public: return *cpu_core; } - Common::SynchronizedWrapper perf_stats; + PerfStats perf_stats; private: /** -- cgit v1.2.3 From fb1979d7e26c20fe2b8d2c3d3dc998e5e00f2f61 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Mon, 20 Feb 2017 16:31:59 -0800 Subject: Core: Re-write frame limiter Now based on std::chrono, and also works in terms of emulated time instead of frames, so we can in the future frame-limit even when the display is disabled, etc. The frame limiter can also be enabled along with v-sync now, which should be useful for those with displays running at more than 60 Hz. --- src/core/core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index db3b98a05..6c9c936b5 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -94,6 +94,7 @@ public: } PerfStats perf_stats; + FrameLimiter frame_limiter; private: /** -- cgit v1.2.3