Core: Make PerfStats internally locked

More ergonomic to use and will be required for upcoming changes.
This commit is contained in:
Yuri Kunde Schlesner 2017-02-20 13:56:58 -08:00
parent f273959205
commit b285c2a4ed
7 changed files with 25 additions and 16 deletions

View file

@ -110,8 +110,7 @@ void System::PrepareReschedule() {
}
PerfStats::Results System::GetAndResetPerfStats() {
auto perf_stats = this->perf_stats.Lock();
return perf_stats->GetAndResetStats(CoreTiming::GetGlobalTimeUs());
return perf_stats.GetAndResetStats(CoreTiming::GetGlobalTimeUs());
}
void System::Reschedule() {
@ -147,7 +146,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
// Reset counters and set time origin to current frame
GetAndResetPerfStats();
perf_stats.Lock()->BeginSystemFrame();
perf_stats.BeginSystemFrame();
return ResultStatus::Success;
}