summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@gmail.com>2018-08-04 12:28:55 +0200
committerfalkTX <falktx@gmail.com>2018-08-04 12:28:55 +0200
commit8e747ec0d573d66396a4f81dbc7a167964494e07 (patch)
treec41382f0bed0d70b6eae1f55bd04bd21cf61d056
parent421fdc2ccead216ac00a5810a568bd1ea03cbef1 (diff)
Allow to specific standalone app idle time
-rw-r--r--dgl/Application.hpp2
-rw-r--r--dgl/src/Application.cpp4
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);
}
}