diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-12-02 14:20:43 -0500 |
|---|---|---|
| committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-12-02 14:20:43 -0500 |
| commit | 2b9afa4d56a4a990587551e71ba7524f2db5da8f (patch) | |
| tree | cff2c5d404b77e93e875fbf40cf78ea6d30d32b0 /src/yuzu/loading_screen.cpp | |
| parent | 9e6baeeea2b7609dafc105aeb964558d29162d8b (diff) | |
general: Replace high_resolution_clock with steady_clock
On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
Diffstat (limited to 'src/yuzu/loading_screen.cpp')
| -rw-r--r-- | src/yuzu/loading_screen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp index ae842306c8..b001b8c23c 100644 --- a/src/yuzu/loading_screen.cpp +++ b/src/yuzu/loading_screen.cpp @@ -136,7 +136,7 @@ void LoadingScreen::OnLoadComplete() { void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) { using namespace std::chrono; - const auto now = high_resolution_clock::now(); + const auto now = steady_clock::now(); // reset the timer if the stage changes if (stage != previous_stage) { ui->progress_bar->setStyleSheet(QString::fromUtf8(progressbar_style[stage])); @@ -160,7 +160,7 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size // If theres a drastic slowdown in the rate, then display an estimate if (now - previous_time > milliseconds{50} || slow_shader_compile_start) { if (!slow_shader_compile_start) { - slow_shader_start = high_resolution_clock::now(); + slow_shader_start = steady_clock::now(); slow_shader_compile_start = true; slow_shader_first_value = value; } |
