Bug 1004923 part 4 - Add some early returns to PRMJ_Now. r=njn
This commit is contained in:
@@ -351,9 +351,9 @@ PRMJ_Now()
|
|||||||
// behavior for this call. It's possible that in the
|
// behavior for this call. It's possible that in the
|
||||||
// future, the user will want the high resolution timer, so
|
// future, the user will want the high resolution timer, so
|
||||||
// we don't disable it entirely.
|
// we don't disable it entirely.
|
||||||
returnedTime = int64_t(lowresTime);
|
return int64_t(lowresTime);
|
||||||
needsCalibration = false;
|
}
|
||||||
} else {
|
|
||||||
// It is possible that when we recalibrate, we will return a
|
// It is possible that when we recalibrate, we will return a
|
||||||
// value less than what we have returned before; this is
|
// value less than what we have returned before; this is
|
||||||
// unavoidable. We cannot tell the different between a
|
// unavoidable. We cannot tell the different between a
|
||||||
@@ -364,11 +364,9 @@ PRMJ_Now()
|
|||||||
// decreases; the old implementation has this behavior as
|
// decreases; the old implementation has this behavior as
|
||||||
// well.
|
// well.
|
||||||
needsCalibration = true;
|
needsCalibration = true;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// No detectable clock skew.
|
// No detectable clock skew.
|
||||||
returnedTime = int64_t(highresTime);
|
return int64_t(highresTime);
|
||||||
needsCalibration = false;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No high resolution timer is available, so fall back.
|
// No high resolution timer is available, so fall back.
|
||||||
|
|||||||
Reference in New Issue
Block a user