From 8e747ec0d573d66396a4f81dbc7a167964494e07 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 4 Aug 2018 12:28:55 +0200 Subject: [PATCH] Allow to specific standalone app idle time --- dgl/Application.hpp | 2 +- dgl/src/Application.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dgl/Application.hpp b/dgl/Application.hpp index 6787c493..dc630ceb 100644 --- a/dgl/Application.hpp +++ b/dgl/Application.hpp @@ -62,7 +62,7 @@ public: idle() is called at regular intervals. @note This function is meant for standalones only, *never* call this from plugins. */ - void exec(); + void exec(int idleTime = 10); /** Quit the application. diff --git a/dgl/src/Application.cpp b/dgl/src/Application.cpp index f7d42af5..114ee8fc 100644 --- a/dgl/src/Application.cpp +++ b/dgl/src/Application.cpp @@ -44,12 +44,12 @@ void Application::idle() } } -void Application::exec() +void Application::exec(int idleTime) { for (; pData->doLoop;) { idle(); - d_msleep(10); + d_msleep(idleTime); } }