remainingMaxWait property
Duration?
get
remainingMaxWait
Time remaining until the maxWait timer forces execution.
Implementation
Duration? get remainingMaxWait {
if (_maxWaitTimer == null || _firstCallTime == null || _maxWait == null) {
return null;
}
if (_isPaused && _remainingMaxWaitOnPause != null) {
return _remainingMaxWaitOnPause;
}
final elapsed = DateTime.now().difference(_firstCallTime!);
final remaining = _maxWait - elapsed;
return remaining.isNegative ? Duration.zero : remaining;
}