mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:28:37 +02:00
changed 2000 into a constant defined inline
This commit is contained in:
parent
8c700d43f3
commit
d08b63b247
1 changed files with 2 additions and 1 deletions
|
@ -416,8 +416,9 @@ void printVoxelCode(unsigned char* voxelCode) {
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
void usleep(int waitTime) {
|
void usleep(int waitTime) {
|
||||||
|
const quint64 BUSY_LOOP_USECS = 2000;
|
||||||
quint64 compTime = waitTime + usecTimestampNow();
|
quint64 compTime = waitTime + usecTimestampNow();
|
||||||
quint64 compTimeSleep = compTime - 2000;
|
quint64 compTimeSleep = compTime - BUSY_LOOP_USECS;
|
||||||
while (true) {
|
while (true) {
|
||||||
if (usecTimestampNow() < compTimeSleep) {
|
if (usecTimestampNow() < compTimeSleep) {
|
||||||
QThread::msleep(1);
|
QThread::msleep(1);
|
||||||
|
|
Loading…
Reference in a new issue