diff options
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Timer.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/FbTk/Timer.cc b/src/FbTk/Timer.cc index 6a478bd..38f1a32 100644 --- a/src/FbTk/Timer.cc +++ b/src/FbTk/Timer.cc | |||
@@ -112,7 +112,16 @@ Timer::~Timer() { | |||
112 | 112 | ||
113 | 113 | ||
114 | void Timer::setTimeout(uint64_t timeout) { | 114 | void Timer::setTimeout(uint64_t timeout) { |
115 | |||
116 | bool was_timing = isTiming(); | ||
117 | if (was_timing) { | ||
118 | stop(); | ||
119 | } | ||
115 | m_timeout = timeout; | 120 | m_timeout = timeout; |
121 | |||
122 | if (was_timing) { | ||
123 | start(); | ||
124 | } | ||
116 | } | 125 | } |
117 | 126 | ||
118 | void Timer::setCommand(const RefCount<Slot<void> > &cmd) { | 127 | void Timer::setCommand(const RefCount<Slot<void> > &cmd) { |