Bug 1190735 - Remove nsITimer.TYPE_REPEATING_PRECISE. r=froydnj.
This commit is contained in:
@@ -291,12 +291,6 @@ nsTimerImpl::SetDelay(uint32_t aDelay)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
||||
// If we're already repeating precisely, update mTimeout now so that the
|
||||
// new delay takes effect in the future.
|
||||
if (!mTimeout.IsNull() && mType == TYPE_REPEATING_PRECISE) {
|
||||
mTimeout = TimeStamp::Now();
|
||||
}
|
||||
|
||||
SetDelayInternal(aDelay);
|
||||
|
||||
if (!mFiring && gThread) {
|
||||
@@ -476,10 +470,9 @@ nsTimerImpl::Fire()
|
||||
("[this=%p] Took %fms to fire timer callback\n",
|
||||
this, (TimeStamp::Now() - now).ToMilliseconds()));
|
||||
|
||||
// Reschedule repeating timers, except REPEATING_PRECISE which already did
|
||||
// that in PostTimerEvent, but make sure that we aren't armed already (which
|
||||
// can happen if the callback reinitialized the timer).
|
||||
if (IsRepeating() && mType != TYPE_REPEATING_PRECISE && !mArmed) {
|
||||
// Reschedule repeating timers, but make sure that we aren't armed already
|
||||
// (which can happen if the callback reinitialized the timer).
|
||||
if (IsRepeating() && !mArmed) {
|
||||
if (mType == TYPE_REPEATING_SLACK) {
|
||||
SetDelayInternal(mDelay); // force mTimeout to be recomputed. For
|
||||
}
|
||||
@@ -499,9 +492,7 @@ nsTimerImpl::SetDelayInternal(uint32_t aDelay)
|
||||
mDelay = aDelay;
|
||||
|
||||
TimeStamp now = TimeStamp::Now();
|
||||
if (mTimeout.IsNull() || mType != TYPE_REPEATING_PRECISE) {
|
||||
mTimeout = now;
|
||||
}
|
||||
mTimeout = now;
|
||||
|
||||
mTimeout += delayInterval;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user