Update the documentation about the sign in QElapsedTimer::(m)secsTo

Since all implementations calculate other - *this, if other has a higher
value (was started later), then the returned value is positive.

The implementations are:
generic: return other.t1 - t1
win: return ticksToNanoseconds(other.t1 - t1) / 1000000
mac: return absoluteToMSecs(other.t1 - t1);
unix: return (other.t1 - t1) * Q_INT64_C(1000) + fraction...

Task-number: QTBUG-25128
Change-Id: Iff0a3460ae9e9d9bdd82fbaad55657fb60e5235a
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
This commit is contained in:
Thiago Macieira 2012-04-02 15:25:29 -03:00 committed by Qt by Nokia
parent e979012a2f
commit 6da3e4d865

View File

@ -150,8 +150,8 @@ qint64 QElapsedTimer::msecsSinceReference() const
/*!
Returns the number of milliseconds between this QElapsedTimer and \a
other. If \a other was started before this object, the returned value
will be positive. If it was started later, the returned value will be
negative.
will be negative. If it was started later, the returned value will be
positive.
The return value is undefined if this object or \a other were invalidated.
@ -166,7 +166,7 @@ qint64 QElapsedTimer::msecsTo(const QElapsedTimer &other) const
/*!
Returns the number of seconds between this QElapsedTimer and \a other. If
\a other was started before this object, the returned value will be
positive. If it was started later, the returned value will be negative.
negative. If it was started later, the returned value will be positive.
The return value is undefined if this object or \a other were invalidated.