Skip to content

Commit

Permalink
Finalizing throttling
Browse files Browse the repository at this point in the history
  • Loading branch information
draggor committed Apr 5, 2011
1 parent 7300b12 commit 64eeb0d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions util.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ exports.burstThrottle = function (func, b, bt, t, ctx) {
if(!bTimeout) {
bTimeout = setTimeout(function() {
burst = 0;
bTimeout = false;
}, bt);
}
}
Expand All @@ -159,7 +160,6 @@ exports.burstThrottle = function (func, b, bt, t, ctx) {
return f;
}


/*
var l = exports.burstThrottle(function(a, b) { console.log([a, b]); }, 3, 1000, 2000);
Expand All @@ -169,7 +169,14 @@ l('c', 3);
l('d', 4);
l('e', 5);
l('f', 6);
setTimeout(function(){l('g', 7);}, 2000);
setTimeout(function(){
l('g', 7);
l('h', 8);
l('i', 9);
l('j', 10);
l('k', 11);
l('l', 12);
}, 12000);
*/

exports.split = function(str, separator, limit) {
Expand Down

0 comments on commit 64eeb0d

Please sign in to comment.