mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-24 10:37:52 -05:00
Merge pull request #7489 from Morph1984/steady-clock
general: Replace high_resolution_clock with steady_clock
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -84,8 +84,8 @@ private:
|
||||
// shaders, it will start quickly but end slow if new shaders were added since previous launch.
|
||||
// These variables are used to detect the change in speed so we can generate an ETA
|
||||
bool slow_shader_compile_start = false;
|
||||
std::chrono::high_resolution_clock::time_point slow_shader_start;
|
||||
std::chrono::high_resolution_clock::time_point previous_time;
|
||||
std::chrono::steady_clock::time_point slow_shader_start;
|
||||
std::chrono::steady_clock::time_point previous_time;
|
||||
std::size_t slow_shader_first_value = 0;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user