Commit f20d6788 authored by lpy's avatar lpy Committed by Commit bot

Enable ThreadTicks on Windows.

BUG=v8:5000

Review-Url: https://codereview.chromium.org/2106243002
Cr-Commit-Position: refs/heads/master@{#37454}
parent 02c3414d
......@@ -618,14 +618,14 @@ bool TimeTicks::IsHighResolutionClockWorking() {
#endif // V8_OS_WIN
// TODO(lpy): For windows ThreadTicks implementation,
// see http://crbug.com/v8/5000
bool ThreadTicks::IsSupported() {
#if (defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \
defined(V8_OS_MACOSX) || defined(V8_OS_ANDROID)
return true;
defined(V8_OS_MACOSX) || defined(V8_OS_ANDROID)
return true;
#elif defined(V8_OS_WIN)
return IsSupportedWin();
#else
return false;
return false;
#endif
}
......
......@@ -186,7 +186,6 @@ TEST(TimeTicks, IsMonotonic) {
}
// Disable on windows until it is implemented.
#if V8_OS_ANDROID
#define MAYBE_ThreadNow DISABLED_ThreadNow
#else
......@@ -194,6 +193,7 @@ TEST(TimeTicks, IsMonotonic) {
#endif
TEST(ThreadTicks, MAYBE_ThreadNow) {
if (ThreadTicks::IsSupported()) {
ThreadTicks::WaitUntilInitialized();
TimeTicks begin = TimeTicks::Now();
ThreadTicks begin_thread = ThreadTicks::Now();
// Make sure that ThreadNow value is non-zero.
......
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