private long getOffset(Protocol.Section info, long until) {
        long sizeOfFirst = info.length;
        long timeDeltaFirst = info.endTime - info.startTime;
        long timeToSkipFirst = until - info.startTime;
        System.out.println(timeToSkipFirst + " " + timeDeltaFirst);

        // long exactStartingPlace = (timeToSkip * sizeOfFirst)/
        // timeDelta;

        double startingPlace = ((double) timeToSkipFirst) / ((double) timeDeltaFirst) * ((double) sizeOfFirst);
        long offset = (long) startingPlace; 
        if (offset % 2 != 0)
            offset ++;
        
        if (offset < 0)
            offset = 0;
        if (offset > info.length)
            offset = info.length;
        
        return offset;
    }