mongodb 7.0.0-dev.20251203.sha.a96fa26d → 7.0.0-dev.20251211.sha.f88bfe18
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/lib/cmap/connection.js +3 -3
- package/lib/cmap/connection.js.map +1 -1
- package/lib/cmap/connection_pool.js +2 -2
- package/lib/cmap/connection_pool.js.map +1 -1
- package/lib/cmap/connection_pool_events.js +3 -3
- package/lib/cmap/connection_pool_events.js.map +1 -1
- package/lib/sdam/monitor.js +7 -7
- package/lib/sdam/monitor.js.map +1 -1
- package/lib/sdam/server_description.js +1 -1
- package/lib/sdam/server_description.js.map +1 -1
- package/lib/sdam/topology.js +3 -2
- package/lib/sdam/topology.js.map +1 -1
- package/lib/sessions.js +8 -6
- package/lib/sessions.js.map +1 -1
- package/lib/utils.js +9 -6
- package/lib/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/cmap/connection.ts +4 -4
- package/src/cmap/connection_pool.ts +3 -3
- package/src/cmap/connection_pool_events.ts +4 -4
- package/src/sdam/monitor.ts +9 -9
- package/src/sdam/server_description.ts +8 -2
- package/src/sdam/topology.ts +4 -3
- package/src/sessions.ts +9 -7
- package/src/utils.ts +8 -5
package/src/utils.ts
CHANGED
|
@@ -434,10 +434,13 @@ export function makeStateMachine(stateTable: StateTable): StateTransitionFunctio
|
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
/**
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
437
|
+
/**
|
|
438
|
+
* This function returns the number of milliseconds since an arbitrary point in time.
|
|
439
|
+
* This function should only be used to measure time intervals.
|
|
440
|
+
* @internal
|
|
441
|
+
* */
|
|
442
|
+
export function processTimeMS(): number {
|
|
443
|
+
return Math.floor(performance.now());
|
|
441
444
|
}
|
|
442
445
|
|
|
443
446
|
/** @internal */
|
|
@@ -446,7 +449,7 @@ export function calculateDurationInMs(started: number | undefined): number {
|
|
|
446
449
|
return -1;
|
|
447
450
|
}
|
|
448
451
|
|
|
449
|
-
const elapsed =
|
|
452
|
+
const elapsed = processTimeMS() - started;
|
|
450
453
|
return elapsed < 0 ? 0 : elapsed;
|
|
451
454
|
}
|
|
452
455
|
|