hanxuan commited on
Commit
08d597b
1 Parent(s): 332002e

细节优化

Browse files
Files changed (1) hide show
  1. app.js +1 -1
app.js CHANGED
@@ -39,7 +39,7 @@ app.get('/api', async (req, res) => {
39
  //await page.setViewport({ width: 1920, height: 1080 });
40
 
41
  if (delayTime > 0) {
42
- await page.waitForTimeout(delayTime * 1000);
43
  delayDuration = Date.now() - start - delayTime * 1000;
44
  }
45
 
 
39
  //await page.setViewport({ width: 1920, height: 1080 });
40
 
41
  if (delayTime > 0) {
42
+ await new Promise(resolve => setTimeout(resolve, delayTime * 1000));
43
  delayDuration = Date.now() - start - delayTime * 1000;
44
  }
45