def track_infer_time(buffer: List[int]) -> None:
    """
    A context manager to perform latency measures
    :param buffer: a List where to save latencies for each input
    """
    start = time.perf_counter()
    yield
    end = time.perf_counter()
    buffer.append(end - start)

    A context manager to perform latency measures
    :param buffer: a List where to save latencies for each input
    
cn_clip/deploy/benchmark_utils.py