From 6da3e4d865e391a1d291c4729f4771a87c6bcd65 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 2 Apr 2012 15:25:29 -0300 Subject: 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 Reviewed-by: Casper van Donderen --- src/corelib/tools/qelapsedtimer_generic.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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. -- cgit v1.2.3