diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-04-02 15:25:29 -0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-04 18:10:11 +0200 |
commit | 6da3e4d865e391a1d291c4729f4771a87c6bcd65 (patch) | |
tree | a3ade724cbfec91f59edc876001006470ca439f0 /src | |
parent | e979012a2fd96aaf534c633caeb67543072d7366 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qelapsedtimer_generic.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qelapsedtimer_generic.cpp b/src/corelib/tools/qelapsedtimer_generic.cpp index 038a15bd37..05214f0698 100644 --- a/src/corelib/tools/qelapsedtimer_generic.cpp +++ b/src/corelib/tools/qelapsedtimer_generic.cpp @@ -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. |