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

Unified Diff: base/process/process_metrics.cc

Issue 1543293004: Switch to standard integer types in base/process/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ssize_t Created 5 years 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_freebsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_metrics.cc
diff --git a/base/process/process_metrics.cc b/base/process/process_metrics.cc
index f4a3ea1ac0577373a28635dad6ff943560f7344c..a21891d9121195422bd81e97decce2b041aefd04 100644
--- a/base/process/process_metrics.cc
+++ b/base/process/process_metrics.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/values.h"
+#include "build/build_config.h"
namespace base {
@@ -63,7 +64,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage() {
#if defined(OS_MACOSX) || defined(OS_LINUX)
int ProcessMetrics::CalculateIdleWakeupsPerSecond(
- uint64 absolute_idle_wakeups) {
+ uint64_t absolute_idle_wakeups) {
TimeTicks time = TimeTicks::Now();
if (last_absolute_idle_wakeups_ == 0) {
@@ -73,8 +74,8 @@ int ProcessMetrics::CalculateIdleWakeupsPerSecond(
return 0;
}
- int64 wakeups_delta = absolute_idle_wakeups - last_absolute_idle_wakeups_;
- int64 time_delta = (time - last_idle_wakeups_time_).InMicroseconds();
+ int64_t wakeups_delta = absolute_idle_wakeups - last_absolute_idle_wakeups_;
+ int64_t time_delta = (time - last_idle_wakeups_time_).InMicroseconds();
if (time_delta == 0) {
NOTREACHED();
return 0;
@@ -84,7 +85,7 @@ int ProcessMetrics::CalculateIdleWakeupsPerSecond(
last_absolute_idle_wakeups_ = absolute_idle_wakeups;
// Round to average wakeups per second.
- int64 wakeups_delta_for_ms = wakeups_delta * Time::kMicrosecondsPerSecond;
+ int64_t wakeups_delta_for_ms = wakeups_delta * Time::kMicrosecondsPerSecond;
return (wakeups_delta_for_ms + time_delta / 2) / time_delta;
}
#else
« no previous file with comments | « base/process/process_metrics.h ('k') | base/process/process_metrics_freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698