for(let i=1;i<2000;i++){ for (let k=0;k setTimeout(resolve, 50+(19==(i%20))*1000)); }