aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Timer.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-28 09:19:33 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-28 09:19:33 (GMT)
commit8e96ffb74b98b08ac35dcd1c861421c65a55cbe6 (patch)
tree6c2da67d383d126892708ced362b569af9178db4 /src/FbTk/Timer.hh
parent0f6b73f36abb1fd31893ef16413f010e78ed84ab (diff)
downloadfluxbox-8e96ffb74b98b08ac35dcd1c861421c65a55cbe6.zip
fluxbox-8e96ffb74b98b08ac35dcd1c861421c65a55cbe6.tar.bz2
moved DelayedCmd from Screen.cc to FbTk/Timer.cc, added it to the keys file
Diffstat (limited to 'src/FbTk/Timer.hh')
-rw-r--r--src/FbTk/Timer.hh16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/FbTk/Timer.hh b/src/FbTk/Timer.hh
index bd55435..4b5be95 100644
--- a/src/FbTk/Timer.hh
+++ b/src/FbTk/Timer.hh
@@ -26,6 +26,7 @@
26#define FBTK_TIMER_HH 26#define FBTK_TIMER_HH
27 27
28#include "RefCount.hh" 28#include "RefCount.hh"
29#include "Command.hh"
29 30
30#ifdef HAVE_CTIME 31#ifdef HAVE_CTIME
31 #include <ctime> 32 #include <ctime>
@@ -33,6 +34,7 @@
33 #include <time.h> 34 #include <time.h>
34#endif 35#endif
35#include <list> 36#include <list>
37#include <string>
36 38
37#ifdef HAVE_CONFIG_H 39#ifdef HAVE_CONFIG_H
38#include "config.h" 40#include "config.h"
@@ -49,8 +51,6 @@
49 51
50namespace FbTk { 52namespace FbTk {
51 53
52class Command;
53
54/** 54/**
55 Handles Timeout 55 Handles Timeout
56*/ 56*/
@@ -107,7 +107,17 @@ private:
107 timeval m_timeout; ///< time length 107 timeval m_timeout; ///< time length
108}; 108};
109 109
110/// executes a command after a specified timeout
111class DelayedCmd: public Command {
112public:
113 DelayedCmd(RefCount<Command> &cmd, unsigned int timeout = 200000);
114 void execute();
115 static Command *parse(const std::string &command,
116 const std::string &args, bool trusted);
117private:
118 Timer m_timer;
119};
120
110} // end namespace FbTk 121} // end namespace FbTk
111 122
112#endif // FBTK_TIMER_HH 123#endif // FBTK_TIMER_HH
113