code: function(timeout) {
  			this._autoSaveEnabled = timeout !== -1;
  			this._autoSaveActive = false;
  			if (!this._idle) {
  				var options = {
  					document: document,
  					timeout: timeout
  				};
  				this._idle = new Idle(options);
  				this._idle.addEventListener("Idle", function () { //$NON-NLS-0$
  					if (!this._errorSaving && this.syncEnabled) {
  						this._autoSaveActive = true;
  						this.save().then(function() {
  							this._autoSaveActive = false;
  						});
  					}
  				}.bind(this));
  			} else {
  				this._idle.setTimeout(timeout);
  			}
  		}
docs: Set the autosave timeout. If the timeout is <code>-1</code>, autosave is
  disabled.
  @param {Number} timeout - the autosave timeout in milliseconds