@sapphire/stopwatch
Advanced tools
Comparing version 1.2.0-next.1b1ed93a.0 to 1.2.0-next.262cd948.0
@@ -35,4 +35,4 @@ "use strict"; | ||
this.digits = digits; | ||
tslib_1.__classPrivateFieldSet(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f"); | ||
tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, null, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, null, "f"); | ||
} | ||
@@ -43,3 +43,3 @@ /** | ||
get duration() { | ||
return tslib_1.__classPrivateFieldGet(this, _Stopwatch_end, "f") ? tslib_1.__classPrivateFieldGet(this, _Stopwatch_end, "f") - tslib_1.__classPrivateFieldGet(this, _Stopwatch_start, "f") : perf_hooks_1.performance.now() - tslib_1.__classPrivateFieldGet(this, _Stopwatch_start, "f"); | ||
return (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_end, "f") ? (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_end, "f") - (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_start, "f") : perf_hooks_1.performance.now() - (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_start, "f"); | ||
} | ||
@@ -50,3 +50,3 @@ /** | ||
get running() { | ||
return Boolean(!tslib_1.__classPrivateFieldGet(this, _Stopwatch_end, "f")); | ||
return Boolean(!(0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_end, "f")); | ||
} | ||
@@ -57,4 +57,4 @@ /** | ||
restart() { | ||
tslib_1.__classPrivateFieldSet(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f"); | ||
tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, null, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, null, "f"); | ||
return this; | ||
@@ -66,4 +66,4 @@ } | ||
reset() { | ||
tslib_1.__classPrivateFieldSet(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f"); | ||
tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, tslib_1.__classPrivateFieldGet(this, _Stopwatch_start, "f"), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_start, "f"), "f"); | ||
return this; | ||
@@ -76,4 +76,4 @@ } | ||
if (!this.running) { | ||
tslib_1.__classPrivateFieldSet(this, _Stopwatch_start, perf_hooks_1.performance.now() - this.duration, "f"); | ||
tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, null, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_start, perf_hooks_1.performance.now() - this.duration, "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, null, "f"); | ||
} | ||
@@ -87,3 +87,3 @@ return this; | ||
if (this.running) | ||
tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, perf_hooks_1.performance.now(), "f"); | ||
(0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, perf_hooks_1.performance.now(), "f"); | ||
return this; | ||
@@ -90,0 +90,0 @@ } |
{ | ||
"name": "@sapphire/stopwatch", | ||
"version": "1.2.0-next.1b1ed93a.0", | ||
"version": "1.2.0-next.262cd948.0", | ||
"description": "Accurately measure passing time.", | ||
@@ -10,2 +10,3 @@ "author": "@sapphire", | ||
"types": "dist/index.d.ts", | ||
"typedocMain": "src/index.ts", | ||
"exports": { | ||
@@ -57,3 +58,3 @@ "import": "./dist/index.mjs", | ||
}, | ||
"gitHead": "1b1ed93aff5b21a82c2864f1e3f85963a2eafaa3" | ||
"gitHead": "262cd94841072373389ba2e02056d31da78376ae" | ||
} |
@@ -13,3 +13,2 @@ <div align="center"> | ||
[](https://www.npmjs.com/package/@sapphire/stopwatch) | ||
[](https://depfu.com/github/sapphiredev/utilities?project_id=15195) | ||
@@ -16,0 +15,0 @@ </div> |
Sorry, the diff of this file is not supported yet
20354
123