Patronum/Tests/testutils.cpp
2020-05-07 16:08:56 +03:00

21 lines
426 B
C++

#include "testutils.h"
#include <QCoreApplication>
#include <QDateTime>
#include <QVariantMap>
TestUtils::TestUtils()
{
}
bool TestUtils::wait(const bool &forWait, int msec) {
auto curmsec = QDateTime::currentMSecsSinceEpoch() + msec;
while (curmsec > QDateTime::currentMSecsSinceEpoch() && !forWait) {
QCoreApplication::processEvents();
}
QCoreApplication::processEvents();
return forWait;
}