diff options
author | Daniel Molkentin <danimo@owncloud.com> | 2012-12-06 19:24:53 +0400 |
---|---|---|
committer | Daniel Molkentin <danimo@owncloud.com> | 2012-12-06 20:53:04 +0400 |
commit | 6678beadabd698a2f501a4b3306bd5e0e49f1330 (patch) | |
tree | 734bc5c934d35bcd953dc193328c372855cb895b /src | |
parent | 09793fcd59147a8a26b24bcac8c1efd08baef213 (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.cpp | 12 |
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()); |