MythTV
master
libs
libmythbase
mythtimer.h
Go to the documentation of this file.
1
#ifndef MYTHTIMER_H_
2
#define MYTHTIMER_H_
3
4
#include <cinttypes>
5
#include <QElapsedTimer>
6
#include "
mythbaseexp.h
"
7
13
class
MBASE_PUBLIC
MythTimer
14
{
15
public
:
16
typedef
enum
{
17
kStartRunning
,
18
kStartInactive
,
19
} StartState;
20
21
explicit
MythTimer
(StartState state = kStartInactive);
22
23
void
start(
void
);
24
int
restart(
void
);
25
void
stop(
void
);
26
27
void
addMSecs(
int
ms);
28
29
int
elapsed(
void
)
const
;
30
int64_t nsecsElapsed(
void
)
const
;
31
bool
isRunning
(
void
)
const
;
32
33
private
:
34
QElapsedTimer
m_timer
;
35
int
m_offset
;
36
};
37
38
#endif
MythTimer
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition:
mythtimer.h:13
mythbaseexp.h
MythTimer::kStartInactive
Definition:
mythtimer.h:18
MythTimer::m_offset
int m_offset
Definition:
mythtimer.h:35
MythTimer::m_timer
QElapsedTimer m_timer
Definition:
mythtimer.h:34
MBASE_PUBLIC
#define MBASE_PUBLIC
Definition:
mythbaseexp.h:15
isRunning
static bool isRunning(const char *program)
Returns true if a program containing the specified string is running on this machine.
Definition:
mythtv/programs/mythshutdown/main.cpp:203
MythTimer::kStartRunning
Definition:
mythtimer.h:17
Generated on Sat Oct 5 2019 05:30:17 for MythTV by
1.8.15