aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Timer.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2014-05-12 10:17:00 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2014-05-12 10:17:00 (GMT)
commit948e63eb600e173815a9ddedd2951db56fe51611 (patch)
treea4a96c0cc8f97d200a13e74c45c4f7dc8b1de550 /src/FbTk/Timer.cc
parent913244789fac779d8c4ce719d3e9534312feacc2 (diff)
downloadfluxbox-948e63eb600e173815a9ddedd2951db56fe51611.zip
fluxbox-948e63eb600e173815a9ddedd2951db56fe51611.tar.bz2
detect minute-based strftime-formats (again)
the lag / skipping of the clock was not caused by faulty timer code on fluxbox's side but by the behavior and inner workings of time(). since this is fixed now (913244789f) we can now rollback ec7fe513c8 and detect strftime-formats which need intervals of seconds or minutes. minor: the small change to FbTk::Timer::setTimeout() reduces one start() / stop() cycle for a running timer.
Diffstat (limited to 'src/FbTk/Timer.cc')
-rw-r--r--src/FbTk/Timer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/Timer.cc b/src/FbTk/Timer.cc
index 1806557..61875f7 100644
--- a/src/FbTk/Timer.cc
+++ b/src/FbTk/Timer.cc
@@ -91,7 +91,7 @@ Timer::~Timer() {
91} 91}
92 92
93 93
94void Timer::setTimeout(uint64_t timeout) { 94void Timer::setTimeout(uint64_t timeout, bool force_start) {
95 95
96 bool was_timing = isTiming(); 96 bool was_timing = isTiming();
97 if (was_timing) { 97 if (was_timing) {
@@ -99,7 +99,7 @@ void Timer::setTimeout(uint64_t timeout) {
99 } 99 }
100 m_timeout = timeout; 100 m_timeout = timeout;
101 101
102 if (was_timing) { 102 if (force_start || was_timing) {
103 start(); 103 start();
104 } 104 }
105} 105}