qt5: use 'qt_nanosleep()' for sleeping

Fixes #3162
This commit is contained in:
Christian Prochaska 2019-02-18 14:08:56 +01:00 committed by Norman Feske
parent aa662f939a
commit fb18e7e95d
1 changed files with 0 additions and 16 deletions

View File

@ -115,7 +115,6 @@ QT_BEGIN_NAMESPACE
#ifdef Q_OS_GENODE
#include <base/env.h>
#include <timer_session/connection.h>
#include <assert.h>
@ -573,32 +572,17 @@ static timespec makeTimespec(time_t secs, long nsecs)
void QThread::sleep(unsigned long secs)
{
#ifdef Q_OS_GENODE
static Timer::Connection timer;
timer.msleep(secs * 1000);
#else
qt_nanosleep(makeTimespec(secs, 0));
#endif /* Q_OS_GENODE */
}
void QThread::msleep(unsigned long msecs)
{
#ifdef Q_OS_GENODE
static Timer::Connection timer;
timer.msleep(msecs);
#else
qt_nanosleep(makeTimespec(msecs / 1000, msecs % 1000 * 1000 * 1000));
#endif /* Q_OS_GENODE */
}
void QThread::usleep(unsigned long usecs)
{
#ifdef Q_OS_GENODE
static Timer::Connection timer;
timer.msleep(usecs / 1000);
#else
qt_nanosleep(makeTimespec(usecs / 1000 / 1000, usecs % (1000*1000) * 1000));
#endif /* Q_OS_GENODE */
}
#ifndef Q_OS_GENODE