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

Unified Diff: base/process/process_info_linux.cc

Issue 2715583002: base/process: Use /proc/self/stat to read startup time. (Closed)
Patch Set: Address jln comments. Created 3 years, 10 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/internal_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_info_linux.cc
diff --git a/base/process/process_info_linux.cc b/base/process/process_info_linux.cc
index 33c1dc1a5a8dc60a15d449b96e967d68acd49c93..7cec8f4e4ecbd982b02a98f8ae5804b96ebfb204 100644
--- a/base/process/process_info_linux.cc
+++ b/base/process/process_info_linux.cc
@@ -15,9 +15,8 @@ namespace base {
// static
const Time CurrentProcessInfo::CreationTime() {
- ProcessHandle pid = GetCurrentProcessHandle();
int64_t start_ticks =
- internal::ReadProcStatsAndGetFieldAsInt64(pid, internal::VM_STARTTIME);
+ internal::ReadProcSelfStatsAndGetFieldAsInt64(internal::VM_STARTTIME);
DCHECK(start_ticks);
TimeDelta start_offset = internal::ClockTicksToTimeDelta(start_ticks);
Time boot_time = internal::GetBootTime();
« no previous file with comments | « base/process/internal_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698