diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-05-22 12:07:28 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2020-12-09 12:55:21 -0700 |
commit | af520c8ef32aef67b4e06c60c4fdb49338afeb38 (patch) | |
tree | ccd0c054dc41c17cfcdd3eea29bf13b64e45a1b7 /src/corelib/global/qlogging.cpp | |
parent | c000143ee472fc613b91a4f16f321509e4f0ee18 (diff) |
Use QDeadlineTimer in qlogging.cpp
No change, just shorter code.
Change-Id: I25d85d86649448d5b2b3fffd1450f95b0ec66927
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 04468d7aac..748ca60661 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -53,6 +53,7 @@ #include "qloggingcategory.h" #ifndef QT_BOOTSTRAPPED #include "qelapsedtimer.h" +#include "qdeadlinetimer.h" #include "qdatetime.h" #include "qcoreapplication.h" #include "qthread.h" @@ -1456,9 +1457,7 @@ QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, con } else if (timeFormat == QLatin1String("boot")) { // just print the milliseconds since the elapsed timer reference // like the Linux kernel does - QElapsedTimer now; - now.start(); - uint ms = now.msecsSinceReference(); + uint ms = QDeadlineTimer::current().deadline(); message.append(QString::asprintf("%6d.%03d", uint(ms / 1000), uint(ms % 1000))); #if QT_CONFIG(datestring) } else if (timeFormat.isEmpty()) { |