aboutsummaryrefslogtreecommitdiff
path: root/src/ClockTool.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-06-19 05:04:42 (GMT)
committersimonb <simonb>2006-06-19 05:04:42 (GMT)
commitf6140840f85e35354c219e3a505c6d1aeb4d3837 (patch)
tree64f7c645454f75a0a9d02f5befa7cd59d27321b3 /src/ClockTool.cc
parent3bce4aab734683f968d823ffa2d34a78a4babf93 (diff)
downloadfluxbox-f6140840f85e35354c219e3a505c6d1aeb4d3837.zip
fluxbox-f6140840f85e35354c219e3a505c6d1aeb4d3837.tar.bz2
fix timer issues (esp clock not updating on multiple screens)
Diffstat (limited to 'src/ClockTool.cc')
-rw-r--r--src/ClockTool.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ClockTool.cc b/src/ClockTool.cc
index 2c0ad46..efc0ffb 100644
--- a/src/ClockTool.cc
+++ b/src/ClockTool.cc
@@ -45,6 +45,7 @@
45#else 45#else
46 #include <time.h> 46 #include <time.h>
47#endif 47#endif
48#include <sys/time.h>
48#include <string> 49#include <string>
49#include <typeinfo> 50#include <typeinfo>
50 51
@@ -242,7 +243,9 @@ unsigned int ClockTool::height() const {
242 243
243void ClockTool::updateTime() { 244void ClockTool::updateTime() {
244 // update clock 245 // update clock
245 time_t the_time = time(0); 246 timeval now;
247 gettimeofday(&now, 0);
248 time_t the_time = now.tv_sec;
246 249
247 if (the_time != -1) { 250 if (the_time != -1) {
248 char time_string[255]; 251 char time_string[255];