@@ -201,7 +201,7 @@ class Compilation extends Tapable {
201
201
202
202
addModuleDependencies ( module , dependencies , bail , cacheGroup , recursive , callback ) {
203
203
let _this = this ;
204
- const start = _this . profile && + new Date ( ) ;
204
+ const start = _this . profile && Date . now ( ) ;
205
205
206
206
const factories = [ ] ;
207
207
for ( let i = 0 ; i < dependencies . length ; i ++ ) {
@@ -270,7 +270,7 @@ class Compilation extends Tapable {
270
270
if ( ! dependentModule . profile ) {
271
271
dependentModule . profile = { } ;
272
272
}
273
- afterFactory = + new Date ( ) ;
273
+ afterFactory = Date . now ( ) ;
274
274
dependentModule . profile . factory = afterFactory - start ;
275
275
}
276
276
@@ -290,7 +290,7 @@ class Compilation extends Tapable {
290
290
if ( ! module . profile ) {
291
291
module . profile = { } ;
292
292
}
293
- const time = + new Date ( ) - start ;
293
+ const time = Date . now ( ) - start ;
294
294
if ( ! module . profile . dependencies || time > module . profile . dependencies ) {
295
295
module . profile . dependencies = time ;
296
296
}
@@ -311,7 +311,7 @@ class Compilation extends Tapable {
311
311
iterationDependencies ( dependencies ) ;
312
312
313
313
if ( _this . profile ) {
314
- const afterBuilding = + new Date ( ) ;
314
+ const afterBuilding = Date . now ( ) ;
315
315
module . profile . building = afterBuilding - afterFactory ;
316
316
}
317
317
@@ -332,7 +332,7 @@ class Compilation extends Tapable {
332
332
}
333
333
334
334
if ( _this . profile ) {
335
- const afterBuilding = + new Date ( ) ;
335
+ const afterBuilding = Date . now ( ) ;
336
336
dependentModule . profile . building = afterBuilding - afterFactory ;
337
337
}
338
338
@@ -360,7 +360,7 @@ class Compilation extends Tapable {
360
360
}
361
361
362
362
_addModuleChain ( context , dependency , onModule , callback ) {
363
- const start = this . profile && + new Date ( ) ;
363
+ const start = this . profile && Date . now ( ) ;
364
364
365
365
const errorAndCallback = this . bail ? function errorAndCallback ( err ) {
366
366
callback ( err ) ;
@@ -397,7 +397,7 @@ class Compilation extends Tapable {
397
397
if ( ! module . profile ) {
398
398
module . profile = { } ;
399
399
}
400
- afterFactory = + new Date ( ) ;
400
+ afterFactory = Date . now ( ) ;
401
401
module . profile . factory = afterFactory - start ;
402
402
}
403
403
@@ -408,7 +408,7 @@ class Compilation extends Tapable {
408
408
onModule ( module ) ;
409
409
410
410
if ( this . profile ) {
411
- const afterBuilding = + new Date ( ) ;
411
+ const afterBuilding = Date . now ( ) ;
412
412
module . profile . building = afterBuilding - afterFactory ;
413
413
}
414
414
@@ -436,7 +436,7 @@ class Compilation extends Tapable {
436
436
}
437
437
438
438
if ( this . profile ) {
439
- const afterBuilding = + new Date ( ) ;
439
+ const afterBuilding = Date . now ( ) ;
440
440
module . profile . building = afterBuilding - afterFactory ;
441
441
}
442
442
0 commit comments