@nsshunt/stsinstrumentmanagerclient 1.0.12 → 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,12 +147,11 @@ 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);
154
+ console.log(`-->>ZZZ: ${timeInMs}`);
156
155
  };
157
156
  // https://stackoverflow.com/questions/18031839/how-to-use-process-hrtime-to-get-execution-time-of-async-function/18031945
158
157
  /**
@@ -170,7 +169,7 @@ class RequestLoggerMiddleware extends STSOptionsBase {
170
169
  if (this.options.ignoresocketio && req.originalUrl.includes("socket.io")) {
171
170
  return;
172
171
  }
173
- const start = process.hrtime();
172
+ const start = performance.now();
174
173
  this.#tinyEmitter.emit(
175
174
  "UpdateInstrument_AR_INC"
176
175
  /* UpdateInstrument_AR_INC */