summaryrefslogtreecommitdiffstats
path: root/base/process_util_mac.mm
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-15 17:30:51 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-15 17:30:51 +0000
commit4ebf2a9e3ab572b6b9d911c4d1058a4e5f8eafe5 (patch)
treea082b52de94c6bf572d7b5bbf12e4c4b8b4db51b /base/process_util_mac.mm
parenta21ea79c953c0cd935161a6946502a54eefe57da (diff)
downloadchromium_src-4ebf2a9e3ab572b6b9d911c4d1058a4e5f8eafe5.zip
chromium_src-4ebf2a9e3ab572b6b9d911c4d1058a4e5f8eafe5.tar.gz
chromium_src-4ebf2a9e3ab572b6b9d911c4d1058a4e5f8eafe5.tar.bz2
mac: Remove an obsolete comment.
cpu used to be an int. Now that it's a double, the rounding mentioned in the comment is done at display time. BUG=none TEST=%cpu in task manager still works Review URL: https://codereview.chromium.org/11886048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_mac.mm')
-rw-r--r--base/process_util_mac.mm5
1 files changed, 1 insertions, 4 deletions
diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm
index 8b8c14a..2b59dc4 100644
--- a/base/process_util_mac.mm
+++ b/base/process_util_mac.mm
@@ -447,13 +447,10 @@ double ProcessMetrics::GetCPUUsage() {
if (time_delta == 0)
return 0;
- // We add time_delta / 2 so the result is rounded.
- double cpu = static_cast<double>((system_time_delta * 100.0) / time_delta);
-
last_system_time_ = task_time;
last_time_ = time;
- return cpu;
+ return static_cast<double>(system_time_delta * 100.0) / time_delta;
}
mach_port_t ProcessMetrics::TaskForPid(ProcessHandle process) const {