@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.mjs CHANGED
@@ -147,10 +147,8 @@ class RequestLoggerMiddleware extends STSOptionsBase {
147
147
  "UpdateInstrument_AR_DEC"
148
148
  /* UpdateInstrument_AR_DEC */
149
149
  );
150
- let timeInMs = 0;
151
- const end = process.hrtime(start);
152
- timeInMs = (end[0] * 1e9 + end[1]) / 1e6;
153
- timeInMs = parseFloat(timeInMs.toFixed(4));
150
+ const end = performance.now() - start;
151
+ const timeInMs = parseFloat(end.toFixed(4));
154
152
  this.#tinyEmitter.emit("UpdateInstrument_DH_VAL", timeInMs);
155
153
  this.#tinyEmitter.emit("UpdateInstrument_D_VAL", timeInMs);
156
154
  console.log(`-->>ZZZ: ${timeInMs}`);
@@ -171,7 +169,7 @@ class RequestLoggerMiddleware extends STSOptionsBase {
171
169
  if (this.options.ignoresocketio && req.originalUrl.includes("socket.io")) {
172
170
  return;
173
171
  }
174
- const start = process.hrtime();
172
+ const start = performance.now();
175
173
  this.#tinyEmitter.emit(
176
174
  "UpdateInstrument_AR_INC"
177
175
  /* UpdateInstrument_AR_INC */