diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-09-09 10:47:38 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-09-09 10:47:38 (GMT) |
commit | e68511794130388ab9668fdef0dcf48dbbf002fd (patch) | |
tree | 94f5ad86689e8fd1ffc62864a99c4c76fe1e8cbe /src/FbTk | |
parent | 82d0de9ef46d38288d2f1daa77ac18276d57390f (diff) | |
download | fluxbox_pavel-e68511794130388ab9668fdef0dcf48dbbf002fd.zip fluxbox_pavel-e68511794130388ab9668fdef0dcf48dbbf002fd.tar.bz2 |
simpler to use FbTk/Timer api
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Timer.cc | 5 | ||||
-rw-r--r-- | src/FbTk/Timer.hh | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/FbTk/Timer.cc b/src/FbTk/Timer.cc index 7d7a84b..60df968 100644 --- a/src/FbTk/Timer.cc +++ b/src/FbTk/Timer.cc | |||
@@ -85,6 +85,11 @@ void Timer::setTimeout(const timeval &t) { | |||
85 | m_timeout.tv_usec = t.tv_usec; | 85 | m_timeout.tv_usec = t.tv_usec; |
86 | } | 86 | } |
87 | 87 | ||
88 | void Timer::setTimeout(unsigned int secs, unsigned int usecs) { | ||
89 | m_timeout.tv_sec = secs; | ||
90 | m_timeout.tv_usec = usecs; | ||
91 | } | ||
92 | |||
88 | void Timer::setCommand(RefCount<Command<void> > &cmd) { | 93 | void Timer::setCommand(RefCount<Command<void> > &cmd) { |
89 | m_handler = cmd; | 94 | m_handler = cmd; |
90 | } | 95 | } |
diff --git a/src/FbTk/Timer.hh b/src/FbTk/Timer.hh index 6be269b..e61d77f 100644 --- a/src/FbTk/Timer.hh +++ b/src/FbTk/Timer.hh | |||
@@ -64,6 +64,7 @@ public: | |||
64 | void setTimeout(time_t val); | 64 | void setTimeout(time_t val); |
65 | /// set timeout | 65 | /// set timeout |
66 | void setTimeout(const timeval &val); | 66 | void setTimeout(const timeval &val); |
67 | void setTimeout(unsigned int secs, unsigned int usecs); | ||
67 | void setCommand(RefCount<Command<void> > &cmd); | 68 | void setCommand(RefCount<Command<void> > &cmd); |
68 | void setInterval(int val) { m_interval = val; } | 69 | void setInterval(int val) { m_interval = val; } |
69 | /// start timing | 70 | /// start timing |