Skip to content

Commit df93610

Browse files
authored
Merge pull request #178 from permafrost-dev/fix-issue-176
Fix issue 176
2 parents 08b0e76 + 7bfc6dd commit df93610

3 files changed

Lines changed: 2 additions & 9 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@
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"

src/Stopwatch/NodeStopwatch.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { end } from '../lib/utils';
77
export 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;

src/Stopwatch/Stopwatch.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
11
/* eslint-disable @typescript-eslint/no-inferrable-types */
22

3-
import * as StopWatches from 'stopwatch-node/dist/stopwatch';
43
import { StopwatchEvent } from './StopwatchEvent';
54

65
export 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;

0 commit comments

Comments
 (0)