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

Unified Diff: src/platform-win32.cc

Issue 11033014: Revert "Adding a high-resolution timer to platform win32." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index f9e37d86a2e8b11110d8edf1fa44bd11e15eeb44..65d31a94f9174c23e72ad0a26e199ef0deda29e2 100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -591,16 +591,8 @@ double OS::TimeCurrentMillis() {
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 @@ void OS::SetUp() {
// 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;
}
« 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