Bug 936989 - Fix -Wunused-variable warnings in nsIdleService.cpp. r=vladv

This commit is contained in:
Chris Peterson 2013-10-27 23:12:55 -07:00
parent 4e080ef7cd
commit 67bff2ec34

View File

@ -772,10 +772,14 @@ nsIdleService::IdleTimerCallback(void)
void
nsIdleService::SetTimerExpiryIfBefore(TimeStamp aNextTimeout)
{
#if defined(PR_LOGGING) || defined(MOZ_WIDGET_ANDROID)
TimeDuration nextTimeoutDuration = aNextTimeout - TimeStamp::Now();
#endif
PR_LOG(sLog, PR_LOG_DEBUG,
("idleService: SetTimerExpiryIfBefore: next timeout %0.f msec from now",
nextTimeoutDuration.ToMilliseconds()));
#ifdef MOZ_WIDGET_ANDROID
__android_log_print(ANDROID_LOG_INFO, "IdleService",
"SetTimerExpiryIfBefore: next timeout %0.f msec from now",
@ -825,7 +829,6 @@ nsIdleService::SetTimerExpiryIfBefore(TimeStamp aNextTimeout)
}
}
void
nsIdleService::ReconfigureTimer(void)
{
@ -851,15 +854,20 @@ nsIdleService::ReconfigureTimer(void)
TimeStamp nextTimeoutAt = mLastUserInteraction +
TimeDuration::FromSeconds(mDeltaToNextIdleSwitchInS);
#if defined(PR_LOGGING) || defined(MOZ_WIDGET_ANDROID)
TimeDuration nextTimeoutDuration = nextTimeoutAt - curTime;
#endif
PR_LOG(sLog, PR_LOG_DEBUG,
("idleService: next timeout %0.f msec from now",
nextTimeoutDuration.ToMilliseconds()));
#ifdef MOZ_WIDGET_ANDROID
__android_log_print(ANDROID_LOG_INFO, "IdleService",
"next timeout %0.f msec from now",
nextTimeoutDuration.ToMilliseconds());
#endif
// Check if we should correct the timeout time because we should poll before.
if ((mIdleObserverCount > 0) && UsePollMode()) {
TimeStamp pollTimeout =
@ -880,4 +888,3 @@ nsIdleService::ReconfigureTimer(void)
SetTimerExpiryIfBefore(nextTimeoutAt);
}