From 0eedf3bfea889596a492363fac46524691f8e772 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 22 Apr 2021 18:23:32 +0200 Subject: [PATCH] SystemMonitor: Only show two decimal digits for the CPU usage --- Userland/Applications/SystemMonitor/ProcessModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/SystemMonitor/ProcessModel.cpp b/Userland/Applications/SystemMonitor/ProcessModel.cpp index 5fc6278530..32f2e8576b 100644 --- a/Userland/Applications/SystemMonitor/ProcessModel.cpp +++ b/Userland/Applications/SystemMonitor/ProcessModel.cpp @@ -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: