SPARK-684: OrderBook now calls .Sample(333)

This commit is contained in:
Jake Norbut committed 2018-03-19 09:58:50 -05:00
1 parent 6e6b9faa38
commit 381e277eb9
1 file changed
+3 -1
@@ -45,7 +45,9 @@ namespace mbts.spark {
_current_row = backing<OrderBookRowVM>(nameof(current_row));
var securities_sequence = _bus.subscribe(SparkTags.SecuritiesTag);
var orders_with_found_securities_sequence = _model.on_orders.CombineLatest(securities_sequence,
var orders_with_found_securities_sequence = _model.on_orders
.Sample(TimeSpan.FromMilliseconds(333))
.CombineLatest(securities_sequence,
(order_list, security_dict) => {
List<(OrderRecordImmutable order, SecurityImmutable? security)> orders_and_securities = new List<(OrderRecordImmutable, SecurityImmutable?)>(order_list.state.Count);
foreach (var order in order_list.state.Values) {