summaryrefslogtreecommitdiffstats
path: root/base/time.h
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 15:54:48 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 15:54:48 +0000
commit8af6f3346e40353c78ed6b787aa128f934432689 (patch)
tree54fdeca3410be1e8f8c6317ebdb1693843d40a27 /base/time.h
parentef7511d1b5cfa9645970a16ff5636827121f15b8 (diff)
downloadchromium_src-8af6f3346e40353c78ed6b787aa128f934432689.zip
chromium_src-8af6f3346e40353c78ed6b787aa128f934432689.tar.gz
chromium_src-8af6f3346e40353c78ed6b787aa128f934432689.tar.bz2
The submillisecond test was broken in at least two ways. First, the
high resolution clock is intentionally disabled on some systems (old AMDs). If QueryPerformanceCounter doesn't work on this system, we shouldn't run the test. Second, however, if the time between two HighResNow() calls is *always* 0us, then this test would fail. Due to speedstep technology with intentionally underclocked QPC (at the windows level), this is quite possible. BUG=42850 TEST=TimeTicks.SubMillisecondTimers Review URL: http://codereview.chromium.org/3387011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time.h')
-rw-r--r--base/time.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/time.h b/base/time.h
index 494aa57..79e30b4 100644
--- a/base/time.h
+++ b/base/time.h
@@ -468,6 +468,10 @@ class TimeTicks {
#if defined(OS_WIN)
// Get the absolute value of QPC time drift. For testing.
static int64 GetQPCDriftMicroseconds();
+
+ // Returns true if the high resolution clock is working on this system.
+ // This is only for testing.
+ static bool IsHighResClockWorking();
#endif
// Returns true if this object has not been initialized.