29 private readonly Func<DateTime, bool> _customStepEvaluator;
30 private DateTime _currentUtc = DateTime.MinValue;
40 Func<DateTime, bool> customStepEvaluator)
42 _underlyingTimeProvider = underlyingTimeProvider;
43 _customStepEvaluator = customStepEvaluator;
51 if (_currentUtc == DateTime.MinValue)
55 var utcNow = _underlyingTimeProvider.GetUtcNow();
58 if (_customStepEvaluator(utcNow))
65 private void Initialize()
68 var utcNow = _underlyingTimeProvider.GetUtcNow();
69 for (var i = 0; i < 48; i++)
71 var before = utcNow.AddHours(-1 * i);
72 if (_customStepEvaluator(before))