File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 115115 "find-up" : " ^5.0" ,
116116 "md5" : " ^2.3.0" ,
117117 "stacktrace-gps" : " ^3.1.2" ,
118- "stopwatch-node" : " ^1.1.0" ,
119118 "tslib" : " ^2.5.0" ,
120119 "uuid" : " ^9.0.0" ,
121120 "xml-formatter" : " ^3.3.2"
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ import { end } from '../lib/utils';
77export class NodeStopwatch extends Stopwatch {
88 public memoryLaps : number [ ] = [ ] ;
99
10+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
1011 public start ( name : string | undefined ) : NodeStopwatchEvent {
1112 this . startedAt = new Date ( ) . getTime ( ) ;
12- this . sw . start ( name ) ;
1313
1414 return new NodeStopwatchEvent ( this ) ;
1515 }
@@ -29,7 +29,6 @@ export class NodeStopwatch extends Stopwatch {
2929 }
3030
3131 public stop ( ) : NodeStopwatchEvent {
32- this . sw . stop ( ) ;
3332 this . endedAt = new Date ( ) . getTime ( ) ;
3433
3534 const duration = this . endedAt - this . startedAt ;
Original file line number Diff line number Diff line change 11/* eslint-disable @typescript-eslint/no-inferrable-types */
22
3- import * as StopWatches from 'stopwatch-node/dist/stopwatch' ;
43import { StopwatchEvent } from './StopwatchEvent' ;
54
65export class Stopwatch {
7- protected sw : StopWatches . StopWatch ;
86 public name : string | undefined ;
97 public laps : number [ ] = [ ] ;
108 public startedAt : number = 0 ;
119 public endedAt : number = 0 ;
1210
1311 constructor ( name : string | undefined = undefined ) {
1412 this . name = name ;
15- this . sw = new StopWatches . StopWatch ( name ) ;
1613 this . laps = [ ] ;
1714 this . startedAt = 0 ;
1815 this . endedAt = 0 ;
1916 }
2017
2118 protected initialize ( name : string | undefined ) {
2219 this . name = name ;
23- this . sw = new StopWatches . StopWatch ( name ) ;
2420 this . laps = [ ] ;
2521 this . startedAt = 0 ;
2622 this . endedAt = 0 ;
2723 }
2824
25+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
2926 public start ( name : string | undefined ) : StopwatchEvent {
3027 this . startedAt = new Date ( ) . getTime ( ) ;
31- this . sw . start ( name ) ;
3228
3329 return new StopwatchEvent ( this ) ;
3430 }
@@ -43,7 +39,6 @@ export class Stopwatch {
4339 }
4440
4541 public stop ( ) : StopwatchEvent {
46- this . sw . stop ( ) ;
4742 this . endedAt = new Date ( ) . getTime ( ) ;
4843
4944 const duration = this . endedAt - this . startedAt ;
You can’t perform that action at this time.
0 commit comments