mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-30 03:34:45 +00:00
19 lines
396 B
C++
19 lines
396 B
C++
|
#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;
|
||
|
}
|