Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
async.cpp File Reference
#include "abstractnode.h"
#include "async.h"
#include <QCoreApplication>
#include <QDateTime>
#include <QThread>
#include <QDebug>
#include <quasarapp.h>
#include <thread>
#include <chrono>
#include <qaglobalutils.h>
Include dependency graph for async.cpp:

Go to the source code of this file.

Namespaces

namespace  QH
 The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart library.
 

Macros

#define waitPrivate(CONDITION, TIMEOUT)
 
#define freazePrivate(CONDITION, TIMEOUT)
 

Macro Definition Documentation

◆ freazePrivate

#define freazePrivate (   CONDITION,
  TIMEOUT 
)
Value:
auto curmsec = QDateTime::currentMSecsSinceEpoch() + TIMEOUT; \
while (curmsec > QDateTime::currentMSecsSinceEpoch() && !CONDITION) { \
std::this_thread::sleep_for(std::chrono::microseconds(1)); \
} \
return CONDITION; \

Definition at line 30 of file async.cpp.

◆ waitPrivate

#define waitPrivate (   CONDITION,
  TIMEOUT 
)
Value:
auto curmsec = QDateTime::currentMSecsSinceEpoch() + TIMEOUT; \
while (curmsec > QDateTime::currentMSecsSinceEpoch() && !CONDITION) { \
QCoreApplication::processEvents(); \
} \
QCoreApplication::processEvents(); \
return CONDITION; \

Definition at line 21 of file async.cpp.