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

Unified Diff: base/time/time_win.cc

Issue 2888833002: Force low resolution timers to see what tests fail
Patch Set: Created 3 years, 7 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: base/time/time_win.cc
diff --git a/base/time/time_win.cc b/base/time/time_win.cc
index 4f013a36a53597825d9b07f114219cac296994dd..ce827d13baaf5fc2f4fdecc03121a4cbcd591586 100644
--- a/base/time/time_win.cc
+++ b/base/time/time_win.cc
@@ -376,7 +376,7 @@ TimeDelta RolloverProtectedNow() {
// always updated together.
int32_t original = base::subtle::Acquire_Load(&g_last_time_and_rollovers);
state.as_opaque_32 = original;
- now = g_tick_function();
+ now = g_tick_function() & ~0xF;
uint8_t now_8 = static_cast<uint8_t>(now >> 24);
if (now_8 < state.as_values.last_8)
++state.as_values.rollovers;
@@ -499,7 +499,7 @@ void InitializeNowFunctionPointer() {
// ~72% of users fall within this category.
NowFunction now_function;
base::CPU cpu;
- if (ticks_per_sec.QuadPart <= 0 ||
+ if (true || ticks_per_sec.QuadPart <= 0 ||
!cpu.has_non_stop_time_stamp_counter() || IsBuggyAthlon(cpu)) {
now_function = &RolloverProtectedNow;
} 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