diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-07 10:54:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 10:54:13 -0500 |
commit | a7792e5ff83523142230951ac7eacbd7685dc40b (patch) | |
tree | a7531c65e2ddec1122fc071d44c8106c48352ce3 /src/yuzu/main.cpp | |
parent | 6d61430311d57fa4338bcf33cdcbb04a9a2f16c4 (diff) | |
parent | 376a414f5bc6d27e5e0fbda323caf5520436bf39 (diff) |
Merge pull request #9889 from Morph1984/time-is-ticking
core_timing: Reduce CPU usage on Windows
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f233b065e..c092507f4 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -91,6 +91,9 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include "common/microprofile.h" #include "common/scm_rev.h" #include "common/scope_exit.h" +#ifdef _WIN32 +#include "common/windows/timer_resolution.h" +#endif #ifdef ARCHITECTURE_x86_64 #include "common/x64/cpu_detect.h" #endif @@ -377,6 +380,12 @@ GMainWindow::GMainWindow(std::unique_ptr<Config> config_, bool has_broken_vulkan LOG_INFO(Frontend, "Host RAM: {:.2f} GiB", Common::GetMemInfo().TotalPhysicalMemory / f64{1_GiB}); LOG_INFO(Frontend, "Host Swap: {:.2f} GiB", Common::GetMemInfo().TotalSwapMemory / f64{1_GiB}); +#ifdef _WIN32 + LOG_INFO(Frontend, "Host Timer Resolution: {:.4f} ms", + std::chrono::duration_cast<std::chrono::duration<f64, std::milli>>( + Common::Windows::SetCurrentTimerResolutionToMaximum()) + .count()); +#endif UpdateWindowTitle(); show(); |