Spaces:
Runtime error
Runtime error
细节优化
Browse files
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
|
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 |
|