rxpy:buffer_with_time随机抖动?

时间:2018-01-17 03:45:52

标签: python reactivex rx-py

我正在使用buffer_with_time,它接受​​一个关键字参数:

timespan – Length of each buffer (specified as an integer denoting milliseconds)

但是,时间戳是固定的。我想为它添加一个随机抖动。

如果我的并行任务同时启动,则固定的timespan=5000将每隔五秒同时阻塞。如何使timespan更具动态性,如5000±300ms,这样逐渐缓冲事件会被均匀地发射?

0 个答案:

没有答案