libtcspc.RegulateTimeReached¶
- final class libtcspc.RegulateTimeReached(interval_threshold, count_threshold, numeric_traits=None)[source]¶
Bases:
NodeProcessor that regulates the frequency of
TimeReachedEvent.Ensures that the event stream contains
TimeReachedEventat reasonable abstime intervals and event-count intervals, removing redundant ones based on the same criteria. Useful when sorting events from multiple streams by abstime downstream.- Parameters:
interval_threshold (int or Param[int]) – A
TimeReachedEventis emitted at the next opportunity if at least this abstime interval has elapsed since the previously emitted one. Use the maximum value of the abstime type to effectively disable the interval criterion.count_threshold (int or Param[int]) – A
TimeReachedEventis emitted when this many events have been emitted since the previously emitted one.numeric_traits (NumericTraits or None) – Numeric traits specifying
abstime_type. Defaults toNumericTraits().
Notes
Events handled:
TimeReachedEvent: emit, possibly rate-limited.All event types with an
abstimefield: pass through, possibly followed by aTimeReachedEvent.End of input: emit a final
TimeReachedEventwith the time of the last event passed; pass through.
See also
- tcspc::regulate_time_reached()
The underlying C++ factory function.