diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-24 18:09:37 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-24 18:09:37 (GMT) |
commit | c7fb528f0d80f9d96a2d84444352386d5d4288dc (patch) | |
tree | bc52f4729e948c5021ab322e6ad739f315d41140 /SwifTools/Idle/IdleQuerierTest | |
parent | ea951bec1c4b84b739a9f435e0d17dbb99e4d724 (diff) | |
download | swift-contrib-c7fb528f0d80f9d96a2d84444352386d5d4288dc.zip swift-contrib-c7fb528f0d80f9d96a2d84444352386d5d4288dc.tar.bz2 |
Added SwifTools/Idle module.
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"]) |