PrefManager.delayedSave Member
Syntax
object.delayedSave();
Returns
Remarks
See Also
Source Code
function pm_delayedsave()
{
// this.prefSaveTimer
var now = Number(new Date());
/* If the time == 0, there is no delayed save in progress, and we should
* start one. If it isn't 0, check the delayed save was started within the
* allowed time - this means that if we keep putting off a save, it will
* go through eventually, as we will stop resetting it.
*/
if ((this.prefSaveTime == 0) ||
(now - this.prefSaveTime < this.PREF_MAX_DELAY))
{
if (this.prefSaveTime == 0)
this.prefSaveTime = now;
if (this.prefSaveTimer != 0)
clearTimeout(this.prefSaveTimer);
this.prefSaveTimer = setTimeout(function(o) { o.forceSave() },
this.PREF_SAVE_DELAY, this);
}
}