(fn: (callback: Callback) => void, options: Partial<MonitorIntervalOptions> = {})
| 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(); |
nothing calls this directly
no test coverage detected