System: Log FPS/frame times every second

This commit is contained in:
Connor McLaughlin 2020-12-08 01:47:28 +10:00
parent 0f8f9bc052
commit 98d6b49987

View file

@ -1214,6 +1214,7 @@ void UpdateThrottlePeriod()
{
s_throttle_period =
static_cast<s32>(1000000000.0 / static_cast<double>(s_throttle_frequency) / static_cast<double>(s_target_speed));
ResetThrottler();
}
void ResetThrottler()
@ -1296,6 +1297,9 @@ void UpdatePerformanceCounters()
s_last_global_tick_counter = global_tick_counter;
s_fps_timer.Reset();
Log_PerfPrintf("FPS: %.2f VPS: %.2f Average: %.2fms Worst: %.2fms", s_fps, s_vps, s_average_frame_time,
s_worst_frame_time);
g_host_interface->OnSystemPerformanceCountersUpdated();
}