mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Android service avoid shouldexit timer using all CPU available
This commit is contained in:
parent
3e5ed6af9e
commit
5a63ce8e0e
@ -60,9 +60,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
ApiServerLocal apiServerLocal(&api, sockPath); (void) apiServerLocal;
|
||||
|
||||
// This ugly but RsControlModule has no other way to callback for stop
|
||||
QTimer shouldExitTimer;
|
||||
shouldExitTimer.setTimerType(Qt::VeryCoarseTimer);
|
||||
shouldExitTimer.setInterval(1000);
|
||||
QObject::connect( &shouldExitTimer, &QTimer::timeout, [&](){
|
||||
if(ctrl_mod.processShouldExit()) app.quit(); });
|
||||
if(ctrl_mod.processShouldExit()) app.quit(); } );
|
||||
shouldExitTimer.start();
|
||||
|
||||
return app.exec();
|
||||
|
Loading…
Reference in New Issue
Block a user