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

Unified Diff: base/time/time_mac.cc

Issue 1946303003: Include system time in Mac ThreadTicks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time_mac.cc
diff --git a/base/time/time_mac.cc b/base/time/time_mac.cc
index b7bac35bb637168a25cee9cad872165dc08913f1..c23c4917e757f492ab7a6cc151158a55901878ef 100644
--- a/base/time/time_mac.cc
+++ b/base/time/time_mac.cc
@@ -92,9 +92,11 @@ int64_t ComputeThreadTicks() {
MACH_DCHECK(kr == KERN_SUCCESS, kr) << "thread_info";
base::CheckedNumeric<int64_t> absolute_micros(
- thread_info_data.user_time.seconds);
+ thread_info_data.user_time.seconds +
+ thread_info_data.system_time.seconds);
absolute_micros *= base::Time::kMicrosecondsPerSecond;
- absolute_micros += thread_info_data.user_time.microseconds;
+ absolute_micros += (thread_info_data.user_time.microseconds +
+ thread_info_data.system_time.microseconds);
return absolute_micros.ValueOrDie();
#endif // defined(OS_IOS)
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698