-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimerThread.h
More file actions
64 lines (48 loc) · 807 Bytes
/
TimerThread.h
File metadata and controls
64 lines (48 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef __TIMER_THREAD_H_
#define __TIMER_THREAD_H_
#include <unistd.h>
#include "util/tc_monitor.h"
#include "util/tc_thread.h"
//
#include "globe.h"
//
using namespace tars;
using namespace std;
//
class Log2DBServantImp;
/**
*
*/
class TimerThread : public TC_Thread, public TC_ThreadLock
{
public:
/**
*
*/
TimerThread();
/**
*
*/
~TimerThread();
public:
//
void initialize(tars::Servant *p)
{
m_servant = (Log2DBServantImp *)p;
}
public:
//
void terminate();
protected:
//
virtual void run();
protected:
//
Log2DBServantImp *m_servant;
private:
//定时器心跳间隔时间
int m_iInterval;
//
bool m_bShutdown;
};
#endif