1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 15:27:34 +00:00

Everywhere: Use ElapsedTimer::elapsed_time() for comparisons

Simplify a lot of uses of ElapsedTimer by converting the callers to
elapsed_time from elapsed, as the AK::Time returned is better for unit
conversions and comparisons against constants.
This commit is contained in:
Andrew Kaster 2023-01-01 22:38:53 -07:00 committed by Linus Groh
parent 4afa6e264c
commit ddf348daeb
8 changed files with 22 additions and 12 deletions

View file

@ -128,7 +128,7 @@ void DownloadWidget::did_progress(Optional<u32> total_size, u32 downloaded_size)
StringBuilder builder;
builder.append("Downloaded "sv);
builder.append(human_readable_size(downloaded_size));
builder.appendff(" in {} sec", m_elapsed_timer.elapsed() / 1000);
builder.appendff(" in {} sec", m_elapsed_timer.elapsed_time().to_seconds());
m_progress_label->set_text(builder.to_deprecated_string());
}