Refactor.

This commit is contained in:
Christian Williams 2009-10-12 21:02:50 -05:00
parent e1ebc1e692
commit a3ed49a5ed

View File

@ -35,18 +35,17 @@ jasmine.Queue.prototype.next_ = function () {
var self = this;
if (self.index < self.blocks.length) {
self.blocks[self.index].execute(function () {
var doNext = function () {
self.offset = 0;
self.index++;
self.next_();
};
var now = new Date().getTime();
if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
self.env.lastUpdate = now;
self.env.setTimeout(doNext, 0);
self.env.setTimeout(function() {
self.next_();
}, 0);
} else {
doNext();
self.next_();
}
});
} else {