Clarify QElapsedTimer::hasExpired()'s documentation

The description in terms of timeouts was confusing. Instead, say what
it actually does, in plain terms. Mention that you can do similar for
a duration.

Pick-to: 6.6
Task-number: QTBUG-115447
Change-Id: I4618d7fa290e7959ed3cb51e5c2576b041f77091
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Edward Welbourne 2023-07-24 10:16:59 +02:00
parent 93e9d21490
commit 669470e2be

View File

@ -403,10 +403,12 @@ bool QElapsedTimer::isValid() const noexcept
}
/*!
Returns \c true if this QElapsedTimer has already expired by \a timeout
milliseconds (that is, more than \a timeout milliseconds have elapsed).
The value of \a timeout can be -1 to indicate that this timer does not
expire, in which case this function will always return false.
Returns \c true if elapsed() exceeds the given \a timeout, otherwise \c false.
A negative \a timeout is interpreted as infinite, so \c false is returned in
this case. Otherwise, this is equivalent to \c {elapsed() > timeout}. You
can do the same for a duration by comparing durationElapsed() to a duration
timeout.
\sa elapsed(), QDeadlineTimer
*/