1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:57:35 +00:00

AK+Userland: Return String from human_readable_size() functions

This commit is contained in:
Sam Atkins 2024-01-24 12:16:32 +00:00 committed by Andreas Kling
parent 7e8cfb60eb
commit 388856dc7e
7 changed files with 23 additions and 23 deletions

View file

@ -56,7 +56,7 @@ static void closing_statistics()
warnln("{}+{} blocks out", statistics.total_blocks_out, statistics.partial_blocks_out);
if (statistics.status != Noxfer) {
auto elapsed_time = statistics.timer.elapsed_time();
ByteString copy_speed = "INF B/s";
String copy_speed = "INF B/s"_string;
if (!elapsed_time.is_zero()) {
auto speed = statistics.total_bytes_copied * 1000 / elapsed_time.to_milliseconds();
copy_speed = human_readable_quantity(speed, AK::HumanReadableBasedOn::Base2, "B/s"sv);