aboutsummaryrefslogtreecommitdiff
path: root/src/ClockTool.cc
diff options
context:
space:
mode:
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];