def convert_time_diff_to_total_milliseconds(sample):
    """ Convert between a time diff and total milliseconds.

    :return: total milliseconds
    :rtype: float
    """
    return sample.total_seconds() * 1000.0 + sample.microseconds / 1000.0
