Commit 081fce32 authored by mattloring's avatar mattloring Committed by Commit bot

ThreadTicks::Now support for Solaris

BUG=v8:5739

Review-Url: https://codereview.chromium.org/2576903004
Cr-Commit-Position: refs/heads/master@{#41771}
parent 3f5a60ac
...@@ -639,7 +639,7 @@ bool TimeTicks::IsHighResolutionClockWorking() { ...@@ -639,7 +639,7 @@ bool TimeTicks::IsHighResolutionClockWorking() {
bool ThreadTicks::IsSupported() { bool ThreadTicks::IsSupported() {
#if (defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \ #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)
return true; return true;
#elif defined(V8_OS_WIN) #elif defined(V8_OS_WIN)
return IsSupportedWin(); return IsSupportedWin();
...@@ -655,6 +655,8 @@ ThreadTicks ThreadTicks::Now() { ...@@ -655,6 +655,8 @@ ThreadTicks ThreadTicks::Now() {
#elif(defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \ #elif(defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \
defined(V8_OS_ANDROID) defined(V8_OS_ANDROID)
return ThreadTicks(ClockNow(CLOCK_THREAD_CPUTIME_ID)); return ThreadTicks(ClockNow(CLOCK_THREAD_CPUTIME_ID));
#elif V8_OS_SOLARIS
return ThreadTicks(gethrvtime() / Time::kNanosecondsPerMicrosecond);
#elif V8_OS_WIN #elif V8_OS_WIN
return ThreadTicks::GetForThread(::GetCurrentThread()); return ThreadTicks::GetForThread(::GetCurrentThread());
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment