@nsshunt/stsinstrumentmanagerclient 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -149,10 +149,8 @@ class RequestLoggerMiddleware extends stsutils.STSOptionsBase {
149
149
  "UpdateInstrument_AR_DEC"
150
150
  /* UpdateInstrument_AR_DEC */
151
151
  );
152
- let timeInMs = 0;
153
- const end = process.hrtime(start);
154
- timeInMs = (end[0] * 1e9 + end[1]) / 1e6;
155
- timeInMs = parseFloat(timeInMs.toFixed(4));
152
+ const end = performance.now() - start;
153
+ const timeInMs = parseFloat(end.toFixed(4));
156
154
  this.#tinyEmitter.emit("UpdateInstrument_DH_VAL", timeInMs);
157
155
  this.#tinyEmitter.emit("UpdateInstrument_D_VAL", timeInMs);
158
156
  console.log(`-->>ZZZ: ${timeInMs}`);
@@ -173,7 +171,7 @@ class RequestLoggerMiddleware extends stsutils.STSOptionsBase {
173
171
  if (this.options.ignoresocketio && req.originalUrl.includes("socket.io")) {
174
172
  return;
175
173
  }
176
- const start = process.hrtime();
174
+ const start = performance.now();
177
175
  this.#tinyEmitter.emit(
178
176
  "UpdateInstrument_AR_INC"
179
177
  /* UpdateInstrument_AR_INC */