-
Notifications
You must be signed in to change notification settings - Fork 0
/
CounterTimer.h
47 lines (31 loc) · 1 KB
/
CounterTimer.h
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
// CounterTimer.h: interface for the CCounterTimer class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_COUNTERTIMER_H__AF65D259_9827_414A_A3AA_59C158D7FF77__INCLUDED_)
#define AFX_COUNTERTIMER_H__AF65D259_9827_414A_A3AA_59C158D7FF77__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/// Forward declaration
class CCounterTimer;
class CCounterTimerListener {
public:
virtual void Update(CCounterTimer *Timer) = 0;
};
class CCounterTimer {
public:
CCounterTimer();
virtual ~CCounterTimer();
/// Copying not allowed
CCounterTimer(const CCounterTimer &);
CCounterTimer &operator=(const CCounterTimer &);
void AttachListener(CCounterTimerListener *pListener);
void Step();
void Stop();
void Start(UINT nCount);
private:
UINT m_nCount;
BOOL m_bRunning;
CCounterTimerListener *m_pListener;
};
#endif // !defined(AFX_COUNTERTIMER_H__AF65D259_9827_414A_A3AA_59C158D7FF77__INCLUDED_)