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

Unified Diff: src/base/platform/time.cc

Issue 2016513002: Add missing system time in Mac ThreadTicks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.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: src/base/platform/time.cc
diff --git a/src/base/platform/time.cc b/src/base/platform/time.cc
index b2355a33bde275695d13fe49ceb619ddf12911d5..0e4df010badc7bfd87d557e3824be5dd99b41414 100644
--- a/src/base/platform/time.cc
+++ b/src/base/platform/time.cc
@@ -41,9 +41,11 @@ int64_t ComputeThreadTicks() {
CHECK(kr == KERN_SUCCESS);
v8::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 *= v8::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();
}
#elif V8_OS_POSIX
« 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