MCPcopy
hub / github.com/mongodb/node-mongodb-native / calculateDurationInMs

Function calculateDurationInMs

src/utils.ts:448–455  ·  view source on GitHub ↗
(started: number | undefined)

Source from the content-addressed store, hash-verified

446
447/** @internal */
448export function calculateDurationInMs(started: number | undefined): number {
449 if (typeof started !== 'number') {
450 return -1;
451 }
452
453 const elapsed = processTimeMS() - started;
454 return elapsed < 0 ? 0 : elapsed;
455}
456
457/** @internal */
458export function hasAtomicOperators(

Callers 9

hasTimedOutMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
idleTimeMethod · 0.90
onHeartbeatFailedFunction · 0.90
onHeartbeatSucceededFunction · 0.90
checkServerFunction · 0.90
measureAndRescheduleMethod · 0.90
scheduleWriteWorkloadFunction · 0.85

Calls 1

processTimeMSFunction · 0.85

Tested by

no test coverage detected