diff options
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index c9c9b7615..ca2c28ce4 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -109,6 +109,11 @@ void System::PrepareReschedule() { | |||
| 109 | reschedule_pending = true; | 109 | reschedule_pending = true; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | PerfStats::Results System::GetAndResetPerfStats() { | ||
| 113 | auto perf_stats = this->perf_stats.Lock(); | ||
| 114 | return perf_stats->GetAndResetStats(CoreTiming::GetGlobalTimeUs()); | ||
| 115 | } | ||
| 116 | |||
| 112 | void System::Reschedule() { | 117 | void System::Reschedule() { |
| 113 | if (!reschedule_pending) { | 118 | if (!reschedule_pending) { |
| 114 | return; | 119 | return; |
| @@ -140,6 +145,10 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
| 140 | 145 | ||
| 141 | LOG_DEBUG(Core, "Initialized OK"); | 146 | LOG_DEBUG(Core, "Initialized OK"); |
| 142 | 147 | ||
| 148 | // Reset counters and set time origin to current frame | ||
| 149 | GetAndResetPerfStats(); | ||
| 150 | perf_stats.Lock()->BeginSystemFrame(); | ||
| 151 | |||
| 143 | return ResultStatus::Success; | 152 | return ResultStatus::Success; |
| 144 | } | 153 | } |
| 145 | 154 | ||