Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.14.2
-
None
Description
elapsed time returns negative value of type qint64. It should return quint64. The header seems to be wrong. I noticed this bug while switching from the deprecated QTime to QElapsedTimer.
Negative value: qint64 elapsedMs = QElapsedTimer::elapsed();
Correkt value: quint64 elapsedMs = QElapsedTimer::elapsed();
Docu:
qint64 QElapsedTimer::elapsed() const
Returns the number of milliseconds since this QElapsedTimer was last started.
Calling this function on a QElapsedTimer that is invalid results in undefined behavior.
See also start(), restart(), hasExpired(), isValid(), and invalidate().