code: public static TimecodeDuration calculateDuration(Timecode inPoint, Timecode outPoint)
      {
          if (!inPoint.isCompatible(outPoint)) {
              MutableTimecode mutableTimecode = new MutableTimecode(outPoint);
              mutableTimecode.setTimecodeBase(inPoint.getTimecodeBase());
              mutableTimecode.setDropFrame(inPoint.isDropFrame());
              outPoint = new Timecode(mutableTimecode);
          }
  
          long frameNumber = outPoint.getFrameNumber() - inPoint.getFrameNumber();
          if (frameNumber < 0) {
              frameNumber += (24 * 6 * inPoint.framesPerTenMinutes);
          }
  
          return new TimecodeDuration(inPoint.getTimecodeBase(), frameNumber, inPoint.isDropFrame());
      }
docs: Calculates duration between given inPoint and outPoint.
  In case outPoint does not have the same Timecode base and/or dropFrame flag
  it will convert it to the same Timecode base and dropFrame flag of the inPoint
  
  @param inPoint
  @param outPoint
  @return duration