1 APE.Request.CycledStack = new Class({
2 initialize: function(ape) {
6 this.reajustTime = false;
8 this.timer = this.send.periodical(this.ape.options.cycledStackTime, this);
11 add: function(cmd, params, sessid) {
12 this.stack.push({'cmd':cmd, 'params':params, 'sessid':sessid});
15 setTime: function(time, now) {
19 this.timer = this.send.periodical(time, this);
20 this.reajustTime = false;
22 else this.reajustTime = time;
26 if (this.stack.length > 0) {
27 this.ape.request.send(this.stack);
29 if (this.reajustTime) {
30 this.setTime(this.reajustTime, true);