refactor: use Date.now()
instead of +new Date()
(#38901)
refactor: use Date.now()
This commit is contained in:
parent
8874306dc0
commit
47951cc95b
4 changed files with 11 additions and 11 deletions
|
@ -128,10 +128,10 @@ ifdescribe(!(['arm', 'arm64', 'ia32'].includes(process.arch)))('contentTracing',
|
|||
traceOptions: 'record-until-full'
|
||||
});
|
||||
{
|
||||
const start = +new Date();
|
||||
const start = Date.now();
|
||||
let n = 0;
|
||||
const f = () => {};
|
||||
while (+new Date() - start < 200 || n < 500) {
|
||||
while (Date.now() - start < 200 || n < 500) {
|
||||
await setTimeout(0);
|
||||
f();
|
||||
n++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue