Index: base/process/process_metrics_win.cc |
diff --git a/base/process/process_metrics_win.cc b/base/process/process_metrics_win.cc |
index 1dd97e629cf4e74e93fb50f51a288c10bcccbd6c..6c424e3cacf2446980d21c0c0693f83cba2fdebe 100644 |
--- a/base/process/process_metrics_win.cc |
+++ b/base/process/process_metrics_win.cc |
@@ -225,14 +225,11 @@ double ProcessMetrics::GetCPUUsage() { |
if (time_delta == 0) |
return 0; |
- // We add time_delta / 2 so the result is rounded. |
- int cpu = static_cast<int>((system_time_delta * 100 + time_delta / 2) / |
- time_delta); |
last_system_time_ = system_time; |
last_cpu_time_ = time; |
- return cpu; |
+ return static_cast<double>(system_time_delta * 100.0) / time_delta; |
} |
bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { |