wasLastConnectTryLongerThanSeconds method

bool wasLastConnectTryLongerThanSeconds(
  1. int seconds
)

was last connection try longer than given seconds

Implementation

bool wasLastConnectTryLongerThanSeconds(int seconds) {
  return lastConnectTry == null ||
      lastConnectTry! <
          DateTime.now()
                  .add(Duration(seconds: -seconds))
                  .millisecondsSinceEpoch ~/
              1000;
}