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

SystemMonitor: Only show two decimal digits for the CPU usage

This commit is contained in:
Andreas Kling 2021-04-22 18:23:32 +02:00
parent ac0e387beb
commit 0eedf3bfea

View file

@ -276,7 +276,7 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
case Column::PurgeableNonvolatile:
return pretty_byte_size(thread.current_state.amount_purgeable_nonvolatile);
case Column::CPU:
return thread.current_state.cpu_percent;
return String::formatted("{:.2}", thread.current_state.cpu_percent);
case Column::Processor:
return thread.current_state.cpu;
case Column::Name: