зеркало из https://github.com/mozilla/pjs.git
Bug 380682 - nsIIdleService should allow observers to specify time in seconds instead of minutes. r=roc, sr=neil
This commit is contained in:
Родитель
9da277f68a
Коммит
b5b997017b
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче