summaryrefslogtreecommitdiff
path: root/src/Timer.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-05-16 09:24:40 +0000
committerDana Jansens <danakj@orodu.net>2002-05-16 09:24:40 +0000
commitae093dba2fb97124bb4af3eaf4070b46f07dfd74 (patch)
tree4dc63a1f7a5aebe7568e6a95b9d6123cf1539682 /src/Timer.cc
parenta4c9553c64fb854aa5fdf79f87d5b4d6a07ca67e (diff)
make a new autoRaiseDelay value take effect without having to restart
Diffstat (limited to 'src/Timer.cc')
-rw-r--r--src/Timer.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Timer.cc b/src/Timer.cc
index 917bc337..8cd4714e 100644
--- a/src/Timer.cc
+++ b/src/Timer.cc
@@ -46,6 +46,10 @@ void BTimer::setTimeout(long t) {
_timeout.tv_usec = t;
_timeout.tv_usec -= (_timeout.tv_sec * 1000);
_timeout.tv_usec *= 1000;
+ if (timing) {
+ display.removeTimer(this);
+ display.addTimer(this); // reorder the display
+ }
}
void BTimer::setTimeout(timeval t) {
@@ -63,9 +67,11 @@ void BTimer::start(void) {
}
void BTimer::stop(void) {
- timing = False;
+ if (timing) {
+ timing = False;
- display.removeTimer(this);
+ display.removeTimer(this);
+ }
}
void BTimer::fireTimeout(void) {