def METHOD_NAME(vetos_during_event, selected_intervals, event_window, result_buffer):
    """Computes total time each event overlaps with the corresponding veto.
    """
    res = np.zeros(len(vetos_during_event), np.int64)
    for event_i, veto_window in enumerate(vetos_during_event):
        if veto_window[1] - veto_window[0]:
            vetos_in_window = selected_intervals[veto_window[0]:
                                                 veto_window[1]].copy()
            starts = np.clip(vetos_in_window['time'],
                             event_window[event_i]['time'],
                             event_window[event_i]['endtime'])
            stops = np.clip(vetos_in_window['endtime'],
                            event_window[event_i]['time'],
                            event_window[event_i]['endtime'])
            res[event_i] = np.sum(stops - starts)
    return res