def compute_runtime(length, buffer):
    """
    Takes a length as a time delta and a buffer in seconds 
    Returns number of miliseconds equal to length - buffer
    """
    return (length.total_seconds() - buffer)*1000