aboutsummaryrefslogtreecommitdiff
path: root/src/ClockTool.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-04-18 15:17:11 (GMT)
committersimonb <simonb>2006-04-18 15:17:11 (GMT)
commit4c011a0a12a06ae87e9bdd296ce503131a292d27 (patch)
treefdcdc41e1e3de9bc952b6cdf0b9c5fc21da137fd /src/ClockTool.cc
parent939ffc7ef1ba358e4f7bf874fe24a0418d40eb41 (diff)
downloadfluxbox-4c011a0a12a06ae87e9bdd296ce503131a292d27.zip
fluxbox-4c011a0a12a06ae87e9bdd296ce503131a292d27.tar.bz2
don't check the clock so often...
Diffstat (limited to 'src/ClockTool.cc')
-rw-r--r--src/ClockTool.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ClockTool.cc b/src/ClockTool.cc
index 851973c..e4b6c0c 100644
--- a/src/ClockTool.cc
+++ b/src/ClockTool.cc
@@ -150,10 +150,8 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent,
150 150
151 // setup timer to check the clock every 0.01 second 151 // setup timer to check the clock every 0.01 second
152 // if nothing has changed, it wont update the graphics 152 // if nothing has changed, it wont update the graphics
153 timeval delay; 153 m_timer.setInterval(1);
154 delay.tv_sec = 0; 154 // m_timer.setTimeout(delay); // don't need to set timeout on interval timer
155 delay.tv_usec = 100000;
156 m_timer.setTimeout(delay);
157 FbTk::RefCount<FbTk::Command> update_graphic(new FbTk::SimpleCommand<ClockTool>(*this, 155 FbTk::RefCount<FbTk::Command> update_graphic(new FbTk::SimpleCommand<ClockTool>(*this,
158 &ClockTool::updateTime)); 156 &ClockTool::updateTime));
159 m_timer.setCommand(update_graphic); 157 m_timer.setCommand(update_graphic);
@@ -243,7 +241,6 @@ unsigned int ClockTool::height() const {
243} 241}
244 242
245void ClockTool::updateTime() { 243void ClockTool::updateTime() {
246
247 // update clock 244 // update clock
248 time_t the_time = time(0); 245 time_t the_time = time(0);
249 246