From 84250c8fedf3fbc150e1fe934be45b4372cbcd14 Mon Sep 17 00:00:00 2001 From: petersirka Date: Mon, 5 Aug 2024 23:27:37 +0200 Subject: [PATCH] Improved watcher interval for a long-term process. --- changelog.txt | 1 + debug.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 18ddea4..4160db7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ - unified debug and release mode - they use monitoring files - monitoring can be disabled via `options.watcher = false` in the start script +- improved watcher interval for a long-term process ======================== 0.0.5 diff --git a/debug.js b/debug.js index 67c4788..dbfc107 100644 --- a/debug.js +++ b/debug.js @@ -362,7 +362,8 @@ function runwatching() { reload && livereload(LIVERELOADCHANGE); if (counter % 150 === 0) - speed = isRELOAD ? 3000 : 6000; + speed = isRELOAD ? 3000 : (counter % 750 === 0 ? 30000 : 6000); + setTimeout(refresh_directory, speed); return; }