diff --git a/src/tl/tl/tlTimer.h b/src/tl/tl/tlTimer.h index eda1f1ac4..b25bd6105 100644 --- a/src/tl/tl/tlTimer.h +++ b/src/tl/tl/tlTimer.h @@ -34,12 +34,6 @@ class QDateTime; namespace tl { -/** - * @brief Provides a ms difference between QDateTimes - * This function is provided to emulate QDateTime::msecsTo for Qt < 4.7 - */ -TL_PUBLIC int64_t msecs_to (const QDateTime &from, const QDateTime &to); - /** * @brief A basic timer class * diff --git a/src/tl/unit_tests/tlFileSystemWatcher.cc b/src/tl/unit_tests/tlFileSystemWatcher.cc index 52c871e9b..76a5c6ebe 100644 --- a/src/tl/unit_tests/tlFileSystemWatcher.cc +++ b/src/tl/unit_tests/tlFileSystemWatcher.cc @@ -36,8 +36,8 @@ void wait_for_ms (int ms) { - QDateTime start = QDateTime::currentDateTime (); - while (tl::msecs_to (start, QDateTime::currentDateTime()) < ms) { + tl::Clock start = tl::Clock::current (); + while ((tl::Clock::current () - start).seconds () < ms * 0.001) { QCoreApplication::processEvents (); } }