def METHOD_NAME(self, max_frames):
    """
    Get the time interval according to the maximum number of frames allowed.
    """
    middle_frame = self.get_middle_frame()
    from_frame, to_frame = self.get_from_to_frames(middle_frame, max_frames)
    frame_time = 1 / float(self.fps)
    from_time = from_frame * frame_time
    to_time = to_frame * frame_time
    return from_time, to_time