Bug 1034638 - Don't make QPC to GTC fallback in TimeStamp_windows let change differences of previously taken timestamps, r=robarnold

This commit is contained in:
Honza Bambas 2014-09-16 15:51:51 +02:00
parent f387fc251d
commit cbcc956da6

View File

@ -339,10 +339,6 @@ TimeStampValue::CheckQPC(const TimeStampValue& aOther) const
return deltaQPC;
}
if (!sUseQPC) { // QPC globally disabled
return deltaGTC;
}
// Check QPC is sane before using it.
int64_t diff = DeprecatedAbs(int64_t(deltaQPC) - int64_t(deltaGTC));
if (diff <= sGTCResulutionThreshold) {
@ -357,10 +353,15 @@ TimeStampValue::CheckQPC(const TimeStampValue& aOther) const
mt2ms(duration), mt2ms_f(overflow)));
if (overflow <= sFailureThreshold) { // We are in the limit, let go.
return deltaQPC; // XXX Should we return GTC here?
return deltaQPC;
}
// QPC deviates, don't use it, since now this method may only return deltaGTC.
if (!sUseQPC) { // QPC already disabled, no need to run the fault tolerance algorithm.
return deltaGTC;
}
LOG(("TimeStamp: QPC jittered over failure threshold"));
if (duration < sHardFailureLimit) {