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

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

Issue 2576903004: ThreadTicks::Now support for Solaris (Closed)
Patch Set: Created 4 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 | « 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 76a820955fb98d6d2f8bbac3b03f72bfdc579534..6b483382f02ea7ab655abe2ea301d6692a83e7b9 100644
--- a/src/base/platform/time.cc
+++ b/src/base/platform/time.cc
@@ -639,7 +639,7 @@ bool TimeTicks::IsHighResolutionClockWorking() {
bool ThreadTicks::IsSupported() {
#if (defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \
- defined(V8_OS_MACOSX) || defined(V8_OS_ANDROID)
+ defined(V8_OS_MACOSX) || defined(V8_OS_ANDROID) || defined(V8_OS_SOLARIS)
lpy 2016/12/15 20:05:14 please correct the indentation, not sure how `git
mattloring 2016/12/15 20:07:45 This was the result of a git cl format. I can reve
return true;
#elif defined(V8_OS_WIN)
return IsSupportedWin();
@@ -655,6 +655,8 @@ ThreadTicks ThreadTicks::Now() {
#elif(defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \
defined(V8_OS_ANDROID)
return ThreadTicks(ClockNow(CLOCK_THREAD_CPUTIME_ID));
+#elif V8_OS_SOLARIS
+ return ThreadTicks(gethrvtime() / Time::kNanosecondsPerMicrosecond);
#elif V8_OS_WIN
return ThreadTicks::GetForThread(::GetCurrentThread());
#else
« 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