Here is a a part of the documentation of Qt's QElapsedTimer:
bool QElapsedTimer::hasExpired(qint64 timeout) const
Returns true if this QElapsedTimer has already expired by timeout milliseconds (that is, more than timeout milliseconds have elapsed). The value of timeout can be -1 to indicate that this timer does not expire, in which case this function will always return false.
Shouldn't it rather be implemented as more than timeout -1 milliseconds have elapsed ?
EDIT: My idea about More than timeout -1 is definitely incorrect. What I really wanted to ask was wether the explanation of more than may be incorrect and I think it precisely should be equal or more than.
hasExpired(1)
should always and immediately be true? Why one millisecond, and not one second or microsecond?