Author: ygrego Date: 2015-03-31 16:01:37 +0000 (Tue, 31 Mar 2015) New Revision: 1006 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1006 Log: This object manage timer. Added: oipf/js/utils/TimerManager.js Added: oipf/js/utils/TimerManager.js =================================================================== --- oipf/js/utils/TimerManager.js (rev 0) +++ oipf/js/utils/TimerManager.js 2015-03-31 16:01:37 UTC (rev 1006) @@ -0,0 +1,22 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +var TimerManager = Class.extend({ + + timer: null, + + createTimer: function(time) { + if (this.timer) { + this.timer.cancel(); + } + this.timer = new Timeout(time); + }, + + clearTimer: function() { + this.timer.cancel(); + } + +}); +
participants (1)
-
ygregoï¼ users.nuiton.org