jostlebot commited on
Commit
6de8392
·
1 Parent(s): 2d28d59

Add occasional longer stretch pauses (10-20s)

Browse files
Files changed (1) hide show
  1. static/app.js +7 -0
static/app.js CHANGED
@@ -270,6 +270,13 @@ function calculateDelay() {
270
  const round = state.round;
271
  const { initialMin, initialMax, stretchFactor, maxDelay } = CONFIG.delay;
272
 
 
 
 
 
 
 
 
273
  const factor = Math.pow(stretchFactor, round - 1);
274
  const min = Math.min(initialMin * factor, maxDelay * 0.5);
275
  const max = Math.min(initialMax * factor, maxDelay);
 
270
  const round = state.round;
271
  const { initialMin, initialMax, stretchFactor, maxDelay } = CONFIG.delay;
272
 
273
+ // 20% chance of a longer "stretch pause" (10-20 seconds)
274
+ if (Math.random() < 0.2 && round > 1) {
275
+ const longDelay = 10 + Math.random() * 10; // 10-20 seconds
276
+ return Math.round(longDelay * 10) / 10;
277
+ }
278
+
279
+ // Normal progressive delay
280
  const factor = Math.pow(stretchFactor, round - 1);
281
  const min = Math.min(initialMin * factor, maxDelay * 0.5);
282
  const max = Math.min(initialMax * factor, maxDelay);