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

Unified Diff: base/time/time.h

Issue 489793003: Fix logic on high Windows resolution timer and have (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits and leaky singleton Created 6 years, 4 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 | base/time/time_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.h
diff --git a/base/time/time.h b/base/time/time.h
index 79346f1f0569cab24a99e1f5411cd0008826a28a..084ff4553d7dda46162352be9a2d6e3655494ba6 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -340,13 +340,7 @@ class BASE_EXPORT Time {
// treat it as static across all windows versions.
static const int kMinLowResolutionThresholdMs = 16;
- // Enable or disable Windows high resolution timer. If the high resolution
- // timer is not enabled, calls to ActivateHighResolutionTimer will fail.
- // When disabling the high resolution timer, this function will not cause
- // the high resolution timer to be deactivated, but will prevent future
- // activations.
- // Must be called from the main thread.
- // For more details see comments in time_win.cc.
+ // Enable or disable Windows high resolution timer.
static void EnableHighResolutionTimer(bool enable);
// Activates or deactivates the high resolution timer based on the |activate|
@@ -493,16 +487,6 @@ class BASE_EXPORT Time {
// platform-dependent epoch.
static const int64 kTimeTToMicrosecondsOffset;
-#if defined(OS_WIN)
- // Indicates whether fast timers are usable right now. For instance,
- // when using battery power, we might elect to prevent high speed timers
- // which would draw more power.
- static bool high_resolution_timer_enabled_;
- // Count of activations on the high resolution timer. Only use in tests
- // which are single threaded.
- static int high_resolution_timer_activated_;
-#endif
-
// Time in microseconds in UTC.
int64 us_;
};
« no previous file with comments | « no previous file | base/time/time_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698