summaryrefslogtreecommitdiff
path: root/src/Timer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Timer.cc')
-rw-r--r--src/Timer.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Timer.cc b/src/Timer.cc
index 95985a01..917bc337 100644
--- a/src/Timer.cc
+++ b/src/Timer.cc
@@ -33,10 +33,7 @@
#include "BaseDisplay.h"
#include "Timer.h"
-BTimer::BTimer(BaseDisplay *d, TimeoutHandler *h) {
- display = d;
- handler = h;
-
+BTimer::BTimer(BaseDisplay &d, TimeoutHandler &h) : display(d), handler(h) {
once = timing = False;
}
@@ -61,16 +58,16 @@ void BTimer::start(void) {
if (! timing) {
timing = True;
- display->addTimer(this);
+ display.addTimer(this);
}
}
void BTimer::stop(void) {
timing = False;
- display->removeTimer(this);
+ display.removeTimer(this);
}
void BTimer::fireTimeout(void) {
- if (handler) handler->timeout();
+ handler.timeout();
}