diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2018-01-24 00:51:25 +0300 |
---|---|---|
committer | Olivier Goffart <olivier@woboq.com> | 2018-01-25 16:07:08 +0300 |
commit | eae00f9969e92eca156419b21c02db31a6257889 (patch) | |
tree | 2d7179b02020a55513b305c6cf16c798397815b6 /src/gui/accountstate.cpp | |
parent | 02988229b13f472fc52ec671e061a46d644e6b84 (diff) |
Use std::chrono::milliseconds to represent milliseconds
Diffstat (limited to 'src/gui/accountstate.cpp')
-rw-r--r-- | src/gui/accountstate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp index a4b44b6a7..cf72e4236 100644 --- a/src/gui/accountstate.cpp +++ b/src/gui/accountstate.cpp @@ -198,11 +198,11 @@ void AccountState::checkConnectivity() // IF the account is connected the connection check can be skipped // if the last successful etag check job is not so long ago. ConfigFile cfg; - int polltime = cfg.remotePollInterval(); + std::chrono::milliseconds polltime = cfg.remotePollInterval(); if (isConnected() && _timeSinceLastETagCheck.isValid() - && _timeSinceLastETagCheck.elapsed() < polltime) { - qCDebug(lcAccountState) << account()->displayName() << "The last ETag check succeeded within the last " << polltime / 1000 << " secs. No connection check needed!"; + && _timeSinceLastETagCheck.hasExpired(polltime.count())) { + qCDebug(lcAccountState) << account()->displayName() << "The last ETag check succeeded within the last " << polltime.count() / 1000 << " secs. No connection check needed!"; return; } |