File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -320,10 +320,9 @@ class DecayingMaxLatencyTracker {
320320 }) : _halfLifePeriod = halfLifePeriod ?? Duration (minutes: 1 );
321321
322322 void _decay ({
323- required DateTime ? now,
323+ required DateTime now,
324324 Duration ? updateDelay,
325325 }) {
326- now ?? = clock.now ();
327326 updateDelay ?? = Duration .zero;
328327 final diff = now.difference (_lastUpdated);
329328 if (diff <= updateDelay) {
@@ -339,7 +338,10 @@ class DecayingMaxLatencyTracker {
339338 DateTime ? now,
340339 Duration ? updateDelay,
341340 }) {
342- _decay (now: now, updateDelay: updateDelay ?? const Duration (seconds: 1 ));
341+ _decay (
342+ now: now ?? clock.now (),
343+ updateDelay: updateDelay ?? const Duration (seconds: 1 ),
344+ );
343345 return Duration (microseconds: _value);
344346 }
345347
You can’t perform that action at this time.
0 commit comments