* Starts the polling timer.
()
| 114 | * Starts the polling timer. |
| 115 | */ |
| 116 | #startPolling() { |
| 117 | if (this.#closed) return; |
| 118 | |
| 119 | this.#timer = setInterval(() => this.#poll(), this.#interval); |
| 120 | |
| 121 | // If not persistent, unref the timer to allow process to exit |
| 122 | if (!this.#persistent && this.#timer.unref) { |
| 123 | this.#timer.unref(); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Polls for changes. |
no test coverage detected