def duration(df):
    """Finds time duration of ECG strip

    This function subtracts the minimum time value from the maximum time
    value and returns the duration of the ECG strip.

    :param df: a dataframe of floats of ecg data

    :returns: a float of the duration of the ECG strip in seconds
    """
    max_time = max(df['time'])
    min_time = min(df['time'])
    duration = max_time - min_time
    return duration