Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: base/process/process_metrics_freebsd.cc

Issue 139103007: Use TimeTicks instead of gettimeofday in ProcessMetrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reverty Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/process_metrics.h ('k') | base/process/process_metrics_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_metrics_freebsd.cc
diff --git a/base/process/process_metrics_freebsd.cc b/base/process/process_metrics_freebsd.cc
index b0c20d2e916df74f4d791b84a032cf9362d3dd1c..9d4149de2ad8d5af40ee04df68d4fbfc2cb65194 100644
--- a/base/process/process_metrics_freebsd.cc
+++ b/base/process/process_metrics_freebsd.cc
@@ -14,7 +14,6 @@ namespace base {
ProcessMetrics::ProcessMetrics(ProcessHandle process)
: process_(process),
- last_cpu_time_(0),
last_system_time_(0),
last_cpu_(0) {
processor_count_ = base::SysInfo::NumberOfProcessors();
@@ -87,11 +86,6 @@ double ProcessMetrics::GetCPUUsage() {
int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ };
size_t length = sizeof(info);
- struct timeval now;
- int retval = gettimeofday(&now, NULL);
- if (retval)
- return 0;
-
if (sysctl(mib, arraysize(mib), &info, &length, NULL, 0) < 0)
return 0;
« no previous file with comments | « base/process/process_metrics.h ('k') | base/process/process_metrics_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698