@@ -201,7 +201,7 @@ class Compilation extends Tapable {
201201
202202 addModuleDependencies ( module , dependencies , bail , cacheGroup , recursive , callback ) {
203203 let _this = this ;
204- const start = _this . profile && + new Date ( ) ;
204+ const start = _this . profile && Date . now ( ) ;
205205
206206 const factories = [ ] ;
207207 for ( let i = 0 ; i < dependencies . length ; i ++ ) {
@@ -270,7 +270,7 @@ class Compilation extends Tapable {
270270 if ( ! dependentModule . profile ) {
271271 dependentModule . profile = { } ;
272272 }
273- afterFactory = + new Date ( ) ;
273+ afterFactory = Date . now ( ) ;
274274 dependentModule . profile . factory = afterFactory - start ;
275275 }
276276
@@ -290,7 +290,7 @@ class Compilation extends Tapable {
290290 if ( ! module . profile ) {
291291 module . profile = { } ;
292292 }
293- const time = + new Date ( ) - start ;
293+ const time = Date . now ( ) - start ;
294294 if ( ! module . profile . dependencies || time > module . profile . dependencies ) {
295295 module . profile . dependencies = time ;
296296 }
@@ -311,7 +311,7 @@ class Compilation extends Tapable {
311311 iterationDependencies ( dependencies ) ;
312312
313313 if ( _this . profile ) {
314- const afterBuilding = + new Date ( ) ;
314+ const afterBuilding = Date . now ( ) ;
315315 module . profile . building = afterBuilding - afterFactory ;
316316 }
317317
@@ -332,7 +332,7 @@ class Compilation extends Tapable {
332332 }
333333
334334 if ( _this . profile ) {
335- const afterBuilding = + new Date ( ) ;
335+ const afterBuilding = Date . now ( ) ;
336336 dependentModule . profile . building = afterBuilding - afterFactory ;
337337 }
338338
@@ -360,7 +360,7 @@ class Compilation extends Tapable {
360360 }
361361
362362 _addModuleChain ( context , dependency , onModule , callback ) {
363- const start = this . profile && + new Date ( ) ;
363+ const start = this . profile && Date . now ( ) ;
364364
365365 const errorAndCallback = this . bail ? function errorAndCallback ( err ) {
366366 callback ( err ) ;
@@ -397,7 +397,7 @@ class Compilation extends Tapable {
397397 if ( ! module . profile ) {
398398 module . profile = { } ;
399399 }
400- afterFactory = + new Date ( ) ;
400+ afterFactory = Date . now ( ) ;
401401 module . profile . factory = afterFactory - start ;
402402 }
403403
@@ -408,7 +408,7 @@ class Compilation extends Tapable {
408408 onModule ( module ) ;
409409
410410 if ( this . profile ) {
411- const afterBuilding = + new Date ( ) ;
411+ const afterBuilding = Date . now ( ) ;
412412 module . profile . building = afterBuilding - afterFactory ;
413413 }
414414
@@ -436,7 +436,7 @@ class Compilation extends Tapable {
436436 }
437437
438438 if ( this . profile ) {
439- const afterBuilding = + new Date ( ) ;
439+ const afterBuilding = Date . now ( ) ;
440440 module . profile . building = afterBuilding - afterFactory ;
441441 }
442442
0 commit comments