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

Method constructor

src/sdam/monitor.ts:595–607  ·  view source on GitHub ↗
(fn: (callback: Callback) => void, options: Partial<MonitorIntervalOptions> = {})

Source from the content-addressed store, hash-verified

593 minHeartbeatFrequencyMS: number;
594
595 constructor(fn: (callback: Callback) => void, options: Partial<MonitorIntervalOptions> = {}) {
596 this.fn = fn;
597 this.lastExecutionEnded = -Infinity;
598
599 this.heartbeatFrequencyMS = options.heartbeatFrequencyMS ?? 1000;
600 this.minHeartbeatFrequencyMS = options.minHeartbeatFrequencyMS ?? 500;
601
602 if (options.immediate) {
603 this._executeAndReschedule();
604 } else {
605 this._reschedule(undefined);
606 }
607 }
608
609 wake() {
610 const currentTime = processTimeMS();

Callers

nothing calls this directly

Calls 1

_rescheduleMethod · 0.95

Tested by

no test coverage detected