diff --git a/mythtv/libs/libmythbase/mythtimer.h b/mythtv/libs/libmythbase/mythtimer.h
index fe7373f..3a0c55d 100644
a
|
b
|
|
1 | 1 | #ifndef MYTHTIMER_H_ |
2 | 2 | #define MYTHTIMER_H_ |
3 | 3 | |
4 | | #include <QTime> |
| 4 | #include <QElapsedTimer> |
5 | 5 | #include "mythbaseexp.h" |
6 | 6 | |
7 | 7 | class MBASE_PUBLIC MythTimer |
8 | 8 | { |
9 | 9 | public: |
10 | | MythTimer() : m_running(false) {} |
| 10 | MythTimer() {} |
11 | 11 | |
12 | | void start() { m_running = true; m_timer.start(); } |
| 12 | void start() { m_timer.start(); } |
13 | 13 | int restart() { int ret = elapsed(); |
14 | 14 | m_timer.restart(); |
15 | 15 | return ret; |
16 | 16 | } |
17 | | int elapsed() { int ret = m_timer.elapsed(); |
18 | | if (ret > 86300000) { ret = 0; m_timer.restart(); } |
19 | | return ret; |
20 | | } |
21 | | void stop() { m_running = false; } |
22 | | bool isRunning() const { return m_running; } |
| 17 | int elapsed() { return m_timer.elapsed(); } |
| 18 | void stop() { m_timer.invalidate(); } |
| 19 | bool isRunning() const { return m_timer.isValid(); } |
23 | 20 | |
24 | | void addMSecs(int ms) { m_timer.addMSecs(ms); } |
| 21 | void addMSecs(int ms) { } |
25 | 22 | |
26 | 23 | private: |
27 | | QTime m_timer; |
28 | | bool m_running; |
| 24 | QElapsedTimer m_timer; |
29 | 25 | }; |
30 | 26 | |
31 | 27 | #endif |