From 6678beadabd698a2f501a4b3306bd5e0e49f1330 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Thu, 6 Dec 2012 16:24:53 +0100 Subject: 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). --- src/mirall/csyncthread.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') 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 +#else +#include +#endif + #include #include #include @@ -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()); -- cgit v1.2.3