Revision 35855ff5 ui/static/snf/js/sync.js
b/ui/static/snf/js/sync.js | ||
---|---|---|
361 | 361 |
|
362 | 362 |
_cb = _.bind(_cb, this); |
363 | 363 |
|
364 |
this.faster = function() { |
|
364 |
this.faster = function(do_call) {
|
|
365 | 365 |
this.timeout = this.fast_timeout; |
366 | 366 |
this._called = 0; |
367 |
this.setInterval(); |
|
367 |
this.setInterval(do_call);
|
|
368 | 368 |
} |
369 | 369 |
|
370 |
this.setInterval = function() { |
|
370 |
this.setInterval = function(do_call) {
|
|
371 | 371 |
this.trigger("clear"); |
372 | 372 |
window.clearInterval(this.interval); |
373 | 373 |
|
374 | 374 |
this.interval = window.setInterval(_cb, this.timeout); |
375 | 375 |
this.running = true; |
376 | 376 |
|
377 |
var call = this.call_on_start; |
|
377 |
var call = do_call || this.call_on_start;
|
|
378 | 378 |
|
379 | 379 |
if (this.last_call) { |
380 | 380 |
var next_call = (this.timeout - ((new Date) - this.last_call)); |
Also available in: Unified diff