19 lines
396 B
C++
Raw Normal View History

2019-06-12 08:10:12 +03:00
#include "testutils.h"
#include <QCoreApplication>
#include <QDateTime>
TestUtils::TestUtils()
{
}
bool TestUtils::wait(bool &forWait, int msec) {
auto curmsec = QDateTime::currentMSecsSinceEpoch() + msec;
while (curmsec > QDateTime::currentMSecsSinceEpoch() && !forWait) {
QCoreApplication::processEvents();
}
QCoreApplication::processEvents();
return forWait;
}