Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Not Evaluated
-
Resolution: Invalid
-
Affects Version/s: 5.14.2
-
Fix Version/s: None
-
Component/s: Core: Date/Time
-
Labels:None
-
Platform/s:
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().