28 private static readonly
long MaxDateTimeTicks = DateTime.MaxValue.Ticks;
29 private DateTime _utcNow;
40 _subscriptionManager = subscriptionManager;
57 private void UpdateCurrentTime()
59 long earlyBirdTicks = MaxDateTimeTicks;
60 foreach (var subscription
in _subscriptionManager.DataFeedSubscriptions)
65 subscription.Current ==
null
66 && !subscription.IsUniverseSelectionSubscription
67 && subscription.UtcStartTime == _utcNow
72 subscription.Current ==
null
73 && subscription.IsUniverseSelectionSubscription
74 && subscription.UtcStartTime != _utcNow)
76 subscription.MoveNext();
79 if (subscription.Current !=
null)
81 if (earlyBirdTicks == MaxDateTimeTicks)
83 earlyBirdTicks = subscription.Current.EmitTimeUtc.Ticks;
88 earlyBirdTicks = Math.Min(earlyBirdTicks, subscription.Current.EmitTimeUtc.Ticks);
93 if (earlyBirdTicks != MaxDateTimeTicks)
95 _utcNow =
new DateTime(Math.Max(earlyBirdTicks, _utcNow.Ticks), DateTimeKind.Utc);