Bug 380682 - nsIIdleService should allow observers to specify time in seconds instead of minutes. r=roc, sr=neil

This commit is contained in:
sdwilsh@shawnwilsher.com 2007-06-12 10:13:24 -07:00
parent 37e6ed019e
commit 87db3b3879
2 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ interface nsIIdleService : nsISupports
* time, and when they get back from that.
*
* @param observer the observer to be notified
* @param time the amount of time in minutes the user should idle before
* @param time the amount of time in seconds the user should be idle before
* the observer should be notified.
*
* @note

View File

@ -149,13 +149,13 @@ nsIdleService::CheckAwayState()
for (PRUint32 i = 0; i < mArrayListeners.Length(); i++)
{
IdleListener& curListener = mArrayListeners.ElementAt(i);
if ((curListener.reqIdleTime * 60000 <= idleTime) &&
if ((curListener.reqIdleTime * 1000 <= idleTime) &&
!curListener.isIdle)
{
curListener.isIdle = PR_TRUE;
idleListeners.AppendObject(curListener.observer);
}
else if ((curListener.reqIdleTime * 60000 > idleTime) &&
else if ((curListener.reqIdleTime * 1000 > idleTime) &&
curListener.isIdle)
{
curListener.isIdle = PR_FALSE;