19 lines
402 B
C++
Raw Normal View History

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