Use nanosleep instead of pthread_cond_timedwait for thread sleeping
authorThiago Macieira <thiago.macieira@intel.com>
Sun, 12 Aug 2012 10:54:11 +0000 (12:54 +0200)
committerQt by Nokia <qt-info@nokia.com>
Sat, 25 Aug 2012 03:41:14 +0000 (05:41 +0200)
commitcaa22ff8ad9ee85dadf1620a9be24c1d555c1973
tree3a569e86e367b222e4cc82697dd4a73d859c86d3
parent88c7c35b21df302f3d3124ce26e79ec6429d3bde
Use nanosleep instead of pthread_cond_timedwait for thread sleeping

There's a comment saying nanosleep's availability is questionable, but
the information of what systems don't have that is now lost in
time. It's quite likely that they were older, Unix systems we no
longer support anyway.

nanosleep comes from POSIX.1b-1993, which is merged into POSIX.1-2001,
so chances are that it's supported almost everywhere where Qt runs
(except for Windows anyway).

Change-Id: I4fd18f8715c43a42429000f3b3d2c3b7343f94b4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
src/corelib/kernel/qcore_unix_p.h
src/corelib/thread/qthread_unix.cpp
src/corelib/tools/qelapsedtimer_mac.cpp
src/corelib/tools/qelapsedtimer_unix.cpp