Author: ygrego Date: 2015-06-17 15:26:50 +0000 (Wed, 17 Jun 2015) New Revision: 1738 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1738 Log: Main modification: permit that timeout use succeeded in emulator when method setPowerState is called. Modified: oipf/lib/js/impl/model/LocalSystem.js Modified: oipf/lib/js/impl/model/LocalSystem.js =================================================================== --- oipf/lib/js/impl/model/LocalSystem.js 2015-06-17 15:18:28 UTC (rev 1737) +++ oipf/lib/js/impl/model/LocalSystem.js 2015-06-17 15:26:50 UTC (rev 1738) @@ -379,7 +379,7 @@ this._callbacks = {}; this._eventManager = new EventManager(); this._timerManager = new TimerManager(); - this._timeout = this._timerManager.createTimer; + this._timeout = this._timerManager.createTimer.bind(this._timerManager, 0); this._defaultProperties = defaultProperties; OipfUtils.initProperties.call(this, defaultProperties.localSystem); this.systemReady = true; @@ -548,8 +548,8 @@ this.timeCurrentPowerState = new Date().getTime(); this.powerState = type; this._timeout() - .then(this._fireEvent.bind( - this, this._eventManager.createCustomEvent("PowerStateChange", [this.powerState]))); + .then(this._fireEvent.bind( + this, this._eventManager.createCustomEvent("PowerStateChange", [this.powerState]))); return true; }