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 17:13:26 +00:00
Родитель 9da277f68a
Коммит b5b997017b
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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;