You need to re-factor the code into pieces.
(您需要将代码重新分解为多个部分。)
This doesn't stop execution, it just puts a delay in between the parts. (这不会停止执行,只会在各部分之间造成延迟。)
function partA() {
...
window.setTimeout(partB,1000);
}
function partB() {
...
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…