You.i Engine
YiTimer.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_TIMER_H_
3 #define _YI_TIMER_H_
4 
6 #include "framework/YiPredef.h"
8 #include "signal/YiSignal.h"
9 
14 
15 class CYITimerPriv;
16 
17 
30 {
31 public:
35  enum STATE
36  {
37  OFF = 0,
40  };
41 
47  CYITimer();
48 
56  CYITimer(int32_t nTimerID);
57  virtual ~CYITimer();
58 
64  uint64_t GetInterval() const;
65 
71  STATE GetState() const;
72 
78  bool IsSingleShot() const;
79 
83  void SetInterval(uint64_t uIntervalMs);
84 
92  void SetSingleShot (bool bSingleShot);
93 
103  void Start(uint64_t uIntervalMs);
104 
111  void Start();
112 
118  void Stop();
119 
125  void Suspend();
126 
132  void Resume();
133 
139  void SetTimerID(int32_t nTimerID);
140 
144  int32_t GetTimerID() const;
145 
152 
153 private:
154  CYITimerPriv *m_pPriv;
155 
157 };
158 
161 #endif /* _YI_TIMER_H_ */
Definition: YiTimer.h:38
int32_t GetTimerID() const
void Suspend()
#define YI_DISALLOW_COPY_AND_ASSIGN(TypeName)
Delete the copy constructor and assignment operator (and consequently the move constructor as well) ...
Definition: YiPredef.h:114
The base class for an object accessible from script source code.
Definition: YiScriptableObject.h:28
void Stop()
Definition: YiTimer.h:37
bool IsSingleShot() const
Definition: YiTimer.h:39
A low-precision timer driven by the update loop.
Definition: YiTimer.h:29
void Start()
void SetSingleShot(bool bSingleShot)
STATE GetState() const
Definition: YiSignalHandler.h:174
STATE
Definition: YiTimer.h:35
virtual ~CYITimer()
void SetInterval(uint64_t uIntervalMs)
void SetTimerID(int32_t nTimerID)
uint64_t GetInterval() const
void Resume()
CYISignal< int32_t > TimedOut
Definition: YiTimer.h:151