Posted By

Piotrek290 on 10/31/09


javascript repeat extend interval rinterval

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


extended interval

 / Published in: JavaScript

rInterval(function(){ console.log("waiting for next...") }, 1000, 3);

  1. function rInterval(a1,a2,a3){
  2. var a1=a1||(new Function()),a2=a2||5000,a3=a3||1,a4=a2;
  3. for(var x=0;x<a3;++x){setTimeout(function(){;},a4);a4+=a2;}
  4. }

Report this snippet  

You need to login to post a comment.