Add back support for Env's updateInterval.
This commit is contained in:
parent
bed9e118b6
commit
3b702bd992
3740
lib/jasmine-0.9.0.js
3740
lib/jasmine-0.9.0.js
File diff suppressed because it is too large
Load Diff
12
src/Queue.js
12
src/Queue.js
|
@ -38,7 +38,7 @@ jasmine.Queue.prototype.isRunning = function () {
|
|||
|
||||
jasmine.Queue.prototype._next = function () {
|
||||
var self = this;
|
||||
self.env.setTimeout(function () {
|
||||
var doNext = function () {
|
||||
self.offset = 0;
|
||||
self.index++;
|
||||
if (self.index < self.blocks.length) {
|
||||
|
@ -48,7 +48,15 @@ jasmine.Queue.prototype._next = function () {
|
|||
} else {
|
||||
self.finish();
|
||||
}
|
||||
}, 0);
|
||||
};
|
||||
|
||||
var now = new Date().getTime();
|
||||
if (this.env.updateInterval && now - this.env.lastUpdate > this.env.updateInterval) {
|
||||
this.env.lastUpdate = now;
|
||||
this.env.setTimeout(doNext, 0);
|
||||
} else {
|
||||
doNext();
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.Queue.prototype.finish = function () {
|
||||
|
|
Loading…
Reference in New Issue