Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.6.3, 5.9.4, 5.10.1
-
None
Description
Posix sleep takes seconds, but Windows sleep takes milliseconds.
Compare to solution used by std::this_thread::sleep_for, which uses explicit typing to ensure the caller knows what's what.
Example of possible better interface:
QThread::sleep(qSeconds(1));
...where qSeconds returns a typed object. Alternatively also providing qMiliseconds and qNanoseconds would make the interface of QThread cleaner IMO.
I understand that this would probably be something for Qt 6, and there should still be a compatibility flag that allows existing implementations to remain compatible.