* Starts the polling timer.
()
| 440 | * Starts the polling timer. |
| 441 | */ |
| 442 | #startPolling() { |
| 443 | if (this.#closed) return; |
| 444 | |
| 445 | this.#timer = setInterval(() => this.#poll(), this.#interval); |
| 446 | |
| 447 | // If not persistent, unref the timer to allow process to exit |
| 448 | if (!this.#persistent && this.#timer.unref) { |
| 449 | this.#timer.unref(); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | /** |
| 454 | * Polls for changes. |
no test coverage detected