summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.h
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2024-02-14 22:11:43 +0200
committerAhmad Samir <a.samirh78@gmail.com>2024-02-23 22:07:47 +0200
commitbfc7535a10f7a6e3723f354b41f08a0fe1d18719 (patch)
tree4ee2c19f03cc9952a98a53898b7ed3f2d87204b3 /src/corelib/kernel/qobject.h
parentbb058909626410d22ccd74919d69cd747fbc33ad (diff)
QSingleShotTimer: use nanoseconds precision
This is a step towards making QChronoTimer have nanoseconds precision. Not changing QTimer::singleShot() methods to take nanoseconds; QTimer uses milliseconds for the most part, having the static singleShot() methods take nanoseconds would be a bit surprising? [ChangeLog][Core][QObject] Added startTimer() nanoseconds overload and removed the milliseconds overload. This change is backwards compatible. Change-Id: I69e79c8feb6354846c6d3be57dc529af7abd1313 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r--src/corelib/kernel/qobject.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 76863d66bc..9d4f4bcbff 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -19,6 +19,7 @@
#include <QtCore/qobject_impl.h>
#include <QtCore/qbindingstorage.h>
+#include <QtCore/qtcoreexports.h>
#include <chrono>
@@ -141,7 +142,12 @@ public:
bool moveToThread(QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL);
int startTimer(int interval, Qt::TimerType timerType = Qt::CoarseTimer);
+
+#if QT_CORE_REMOVED_SINCE(6, 8)
int startTimer(std::chrono::milliseconds time, Qt::TimerType timerType = Qt::CoarseTimer);
+#endif
+ int startTimer(std::chrono::nanoseconds time, Qt::TimerType timerType = Qt::CoarseTimer);
+
void killTimer(int id);
template<typename T>