public long nextLts()

in harry-core/src/harry/model/OpSelectors.java [368:383]


        public long nextLts(long lts)
        {
            long slideCount = lts / switchAfter;
            long positionInCycle = lts - slideCount * switchAfter;
            long nextRepeat = positionInCycle / windowSize + 1;

            if (nextRepeat > slideAfterRepeats ||
                (nextRepeat == slideAfterRepeats && (positionInCycle % windowSize) == 0))
                return -1;

            // last cycle before window slides; next window will have shifted by one
            if (nextRepeat == slideAfterRepeats)
                positionInCycle -= 1;

            return slideCount * switchAfter + windowSize + positionInCycle;
        }