mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
21 lines
369 B
C++
21 lines
369 B
C++
|
|
#include "Application.h"
|
|||
|
|
|
|||
|
|
#include "common/Utils.h"
|
|||
|
|
|
|||
|
|
void Application::init()
|
|||
|
|
{
|
|||
|
|
std::thread([=]()
|
|||
|
|
{
|
|||
|
|
while (!isQuit()) { runThreadMain(); }
|
|||
|
|
}).detach();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void Application::runThreadMain()
|
|||
|
|
{
|
|||
|
|
static TimeTick tt;
|
|||
|
|
tt.elapse(1000);
|
|||
|
|
|
|||
|
|
//XLOGD() << "HelloWorld";
|
|||
|
|
|
|||
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
|||
|
|
}
|