[v8] r12652 committed - Revert "Adding a high-resolution timer to platform win32."...

5 views
Skip to first unread message

codesite...@google.com

unread,
Oct 2, 2012, 7:07:44 AM10/2/12
to v8-...@googlegroups.com
Revision: 12652
Author: jkum...@chromium.org
Date: Tue Oct 2 04:07:26 2012
Log: Revert "Adding a high-resolution timer to platform win32."

This reverts r12651.

Review URL: https://codereview.chromium.org/11033014
http://code.google.com/p/v8/source/detail?r=12652

Modified:
/branches/bleeding_edge/src/platform-win32.cc

=======================================
--- /branches/bleeding_edge/src/platform-win32.cc Tue Oct 2 03:59:44 2012
+++ /branches/bleeding_edge/src/platform-win32.cc Tue Oct 2 04:07:26 2012
@@ -591,16 +591,8 @@
return t.ToJSTime();
}

-
-static LARGE_INTEGER frequency = 0;
-
-
-// Returns the tickcounter based on QueryPerformanceCounter or timeGetTime.
+// Returns the tickcounter based on timeGetTime.
int64_t OS::Ticks() {
- static LARGE_INTEGER tick;
- if (frequency != 0 && QueryPerformanceCounter(&tick)) {
- return static_cast<int64_t>(tick.QuadPart * 1e6 / frequency->QuadPart);
- }
return timeGetTime() * 1000; // Convert to microseconds.
}

@@ -2095,15 +2087,12 @@
// call this setup code within the same millisecond.
uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis());
srand(static_cast<unsigned int>(seed));
- // Get the number of ticks per second that is used in OS::Ticks()
- QueryPerformanceFrequency(&frequency);
limit_mutex = CreateMutex();
SamplerThread::SetUp();
}


void OS::TearDown() {
- frequency = 0;
SamplerThread::TearDown();
delete limit_mutex;
}
Reply all
Reply to author
Forward
0 new messages