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

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2012-12-06 19:24:53 +0400
committerDaniel Molkentin <danimo@owncloud.com>2012-12-06 20:53:04 +0400
commit6678beadabd698a2f501a4b3306bd5e0e49f1330 (patch)
tree734bc5c934d35bcd953dc193328c372855cb895b /src
parent09793fcd59147a8a26b24bcac8c1efd08baef213 (diff)
Hack: Sleep 2 secs after sync run
This avoids that we get notified by the system about writing of the csync db (IO has latency).
Diffstat (limited to 'src')
-rw-r--r--src/mirall/csyncthread.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mirall/csyncthread.cpp b/src/mirall/csyncthread.cpp
index 406b68c20..de6b76983 100644
--- a/src/mirall/csyncthread.cpp
+++ b/src/mirall/csyncthread.cpp
@@ -18,6 +18,12 @@
#include "mirall/theme.h"
#include "mirall/logger.h"
+#ifdef Q_OS_WIN
+#include <windows.h>
+#else
+#include <unistd.h>
+#endif
+
#include <QDebug>
#include <QDir>
#include <QMutexLocker>
@@ -360,7 +366,11 @@ cleanup:
qDebug() << "CSync run took " << t.elapsed() << " Milliseconds";
qDebug() << "CSync Waiting a bit to let OS finish up IO";
- sleep(2);
+#ifdef Q_OS_WIN
+ Sleep(2000);
+#else
+ ::sleep(2);
+#endif
qDebug() << "CSync End Waiting";
emit(finished());