summaryrefslogtreecommitdiffstats
path: root/base/time_win.cc
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_win.cc
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_win.cc')
-rw-r--r--base/time_win.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/time_win.cc b/base/time_win.cc
index 00868f6..5d3ecd6 100644
--- a/base/time_win.cc
+++ b/base/time_win.cc
@@ -400,4 +400,9 @@ TimeTicks TimeTicks::HighResNow() {
// static
int64 TimeTicks::GetQPCDriftMicroseconds() {
return Singleton<HighResNowSingleton>::get()->GetQPCDriftMicroseconds();
+}
+
+// static
+bool TimeTicks::IsHighResClockWorking() {
+ return Singleton<HighResNowSingleton>::get()->IsUsingHighResClock();
} \ No newline at end of file