class ReScheduleSupport {

    static long getInitialDelay(long stepSize, Clock clock) {
        long now = clock.wallTime();
        long stepStart = now / stepSize * stepSize;
        // 1/10的时间段，作为过于靠近的判断依据
        long offset = stepSize / 10;

        long delay = now - stepStart;
        if (delay < offset) { //当前时间过于靠近低边界,则启动延时补偿个10%的的stepSize；
            return delay + offset;
        } else if (delay > stepSize - offset) {//当前时间过于靠近高边界，那么再收缩10%的stepSize
            return now - stepStart - offset;
        } else { //如果距离左右边界距离合适
            return delay;
        }
    }

    public  ReScheduleSupport(ScheduledService scheduler, LookoutConfig config, Clock clock);

}