diff options
Diffstat (limited to 'SwifTools/Idle/IdleQuerierTest')
-rw-r--r-- | SwifTools/Idle/IdleQuerierTest/.gitignore | 1 | ||||
-rw-r--r-- | SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp | 16 | ||||
-rw-r--r-- | SwifTools/Idle/IdleQuerierTest/SConscript | 11 |
3 files changed, 28 insertions, 0 deletions
diff --git a/SwifTools/Idle/IdleQuerierTest/.gitignore b/SwifTools/Idle/IdleQuerierTest/.gitignore new file mode 100644 index 0000000..6c63ee9 --- /dev/null +++ b/SwifTools/Idle/IdleQuerierTest/.gitignore @@ -0,0 +1 @@ +IdleQuerierTest diff --git a/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp b/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp new file mode 100644 index 0000000..94f7e2b --- /dev/null +++ b/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp @@ -0,0 +1,16 @@ +#include <iostream> + +#include "SwifTools/Idle/PlatformIdleQuerier.h" +#include "Swiften/Base/sleep.h" + +using namespace Swift; + +int main() { + PlatformIdleQuerier querier; + while (true) { + std::cout << "Idle time: " << querier.getIdleTimeSeconds() << std::endl; + Swift::sleep(1000); + } + + return 0; +} diff --git a/SwifTools/Idle/IdleQuerierTest/SConscript b/SwifTools/Idle/IdleQuerierTest/SConscript new file mode 100644 index 0000000..d45aeea --- /dev/null +++ b/SwifTools/Idle/IdleQuerierTest/SConscript @@ -0,0 +1,11 @@ +Import("env") + +if env["TEST"] : + myenv = env.Clone() + myenv.MergeFlags(myenv["SWIFTOOLS_FLAGS"]) + myenv.MergeFlags(myenv["SWIFTEN_FLAGS"]) + myenv.MergeFlags(myenv["BOOST_FLAGS"]) + myenv.MergeFlags(myenv.get("XSS_FLAGS", {})) + myenv.Append(LIBPATH = ["/usr/X11R6/lib"]) + myenv.Append(LIBS = ["X11", "Xss"]) + tester = myenv.Program("IdleQuerierTest", ["IdleQuerierTest.cpp"]) |