def find_delta(record, prev_rec):
    """Returns the interval in seconds and the rate of change per minute between the two
    log records. Returns None, None if the interval is zero (rate of change is infinite)"""
    if prev_rec is None:
        return None, None
    interval = record.timestamp - prev_rec.timestamp
    if interval == 0:
        return None, None
    return interval, 60.0 * (record.depth - prev_rec.depth) / interval