"docs/vscode:/vscode.git/clone" did not exist on "cbe9fe2cdb745ca70dfde56e6863bf4e70d92241"
Unverified Commit bf5c4aff authored by Jakob Görgen's avatar Jakob Görgen
Browse files

symphony/orchestration: system allow to set latencies for all channels

parent 90e4b61a
......@@ -76,13 +76,17 @@ class System(util_base.IdObj):
for chan in channels:
chan.set_latency(amount, ratio)
def latencies(self, amount: int, ratio: util_base.Time, channel_type: tp.Any) -> None:
relevant_channels = list(
filter(
lambda chan: util_base.check_type(chan, channel_type),
self._all_channels.values(),
def latencies(
self, amount: int, ratio: util_base.Time, channel_type: tp.Any | None = None
) -> None:
relevant_channels = self._all_channels
if channel_type:
relevant_channels = list(
filter(
lambda chan: util_base.check_type(chan, channel_type),
self._all_channels.values(),
)
)
)
System.set_latencies(relevant_channels, amount, ratio)
def toJSON(self) -> dict:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment