summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index c9c9b7615..140ff6451 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -109,6 +109,10 @@ void System::PrepareReschedule() {
reschedule_pending = true;
}
+PerfStats::Results System::GetAndResetPerfStats() {
+ return perf_stats.GetAndResetStats(CoreTiming::GetGlobalTimeUs());
+}
+
void System::Reschedule() {
if (!reschedule_pending) {
return;
@@ -140,6 +144,10 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
LOG_DEBUG(Core, "Initialized OK");
+ // Reset counters and set time origin to current frame
+ GetAndResetPerfStats();
+ perf_stats.BeginSystemFrame();
+
return ResultStatus::Success;
}