docs: long getInitialDelay(long stepSize) {
      long now = clock().wallTime();
      long stepBoundary = now / stepSize * stepSize;
  
      // Buffer by 10% of the step interval on either side
      long offset = stepSize / 10;
  
      // Check if the current delay is within the acceptable range
      long delay = now - stepBoundary;
      if (delay < offset) {
        return delay + offset;
      } else if (delay > stepSize - offset) {
        return stepSize - offset;
      } else {
        return delay;
      }
    }