if (threadArr.length > 0) {
console.log(threadArr.length);
if (nowTime < maxTime) {
let now = new Date().getTime();
var method = threadArr[0];
method();
threadArr.splice(0, 1);
let nowNew = (new Date().getTime() - now);
nowTime += nowNew;
console.log(nowTime);
doingThread();