let t=0; for(var i=0;i<len;i++){ (function (t) { $timeout(function(){ console.log(t); },t); })(t); t+=Math.sin(Math.PI/8/len*i)*1000; //3 s }