Jitter tweaks

This commit is contained in:
Zef Hemel
2025-09-13 17:21:23 +02:00
parent a56007ef77
commit efe5087d93
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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);
}