Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2018-01-24 00:51:25 +0300
committerCamila San <hello@camila.codes>2018-06-06 18:26:53 +0300
commit073a5184cb1dcb491c6f0b4866ac9a6e9d0dc6e3 (patch)
treeae6ea365401788de89ec227e746748091857038d /src/gui/accountstate.cpp
parentea58a1038b989a2ab7f9d5e9e3a33c8be24dd2ae (diff)
Use std::chrono::milliseconds to represent milliseconds
Diffstat (limited to 'src/gui/accountstate.cpp')
-rw-r--r--src/gui/accountstate.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index f7743b9ab..e4303d4f7 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -214,11 +214,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;
}