summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-29 21:03:56 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-29 21:03:56 +0000
commit3cee06615690d5ae925705e3b7b0d428e6d93be9 (patch)
treedeed328cbad889ea20d173a238dc601c458561eb /base
parent3837e65433e994c4aeb09b8ccdfaff5256d1b1dc (diff)
downloadchromium_src-3cee06615690d5ae925705e3b7b0d428e6d93be9.zip
chromium_src-3cee06615690d5ae925705e3b7b0d428e6d93be9.tar.gz
chromium_src-3cee06615690d5ae925705e3b7b0d428e6d93be9.tar.bz2
GTTF: Increase the limit for QPC drift.
Also update the DCHECK to use an absolute value of the skew for comparison. It could be negative. TEST=base_unittests BUG=none Review URL: http://codereview.chromium.org/3083002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54191 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/time_win.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/time_win.cc b/base/time_win.cc
index 872fd97..e28835a 100644
--- a/base/time_win.cc
+++ b/base/time_win.cc
@@ -332,13 +332,13 @@ class HighResNowSingleton {
TimeDelta Now() {
// Our maximum tolerance for QPC drifting.
- const int kMaxTimeDrift = 50 * Time::kMicrosecondsPerMillisecond;
+ const int kMaxTimeDriftMicroseconds = 60150;
if (IsUsingHighResClock()) {
int64 now = UnreliableNow();
// Verify that QPC does not seem to drift.
- DCHECK_LT(now - ReliableNow() - skew_, kMaxTimeDrift);
+ DCHECK_LT(abs((now - ReliableNow()) - skew_), kMaxTimeDriftMicroseconds);
return TimeDelta::FromMicroseconds(now);
}