Jitter tweaks
This commit is contained in:
+2
-2
@@ -154,6 +154,6 @@ export function safeRun(fn: () => Promise<void>) {
|
||||
/**
|
||||
* Generates a random delay between 0 and 1000 milliseconds.
|
||||
*/
|
||||
export function jitter() {
|
||||
return Math.floor(Math.random() * 1000);
|
||||
export function jitter(maxLength = 1000) {
|
||||
return Math.floor(Math.random() * maxLength);
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import {
|
||||
type Path,
|
||||
} from "@silverbulletmd/silverbullet/lib/ref";
|
||||
|
||||
const pageWatchInterval = 4000;
|
||||
const pageWatchInterval = 3000; // + jitter
|
||||
|
||||
export class Space {
|
||||
// We do watch files in the background to detect changes
|
||||
|
||||
Reference in New Issue
Block a user