mFrame
載入中...
搜尋中...
無符合項目
ufm/sys/Timer.h
1
7#ifndef MFRAME_5764966F_889C_4856_97F7_96396168CDD2
8#define MFRAME_5764966F_889C_4856_97F7_96396168CDD2
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15#include "./../func/Runnable.h"
16#include "./../lang/Object.h"
17
18/* ***************************************************************************************
19 * Namespace
20 */
21namespace ufm::sys {
22 class Timer;
23} // namespace ufm::sys
24
25/* ***************************************************************************************
26 * Class/Interface/Struct/Enum
27 */
28
46 /* *************************************************************************************
47 * Variable
48 */
49 private:
56
63 bool mRunning;
64
71 bool mRepeat;
72
78 uint32 mDelay;
79
80 /* *************************************************************************************
81 * Abstract Method
82 */
83
84 /* *************************************************************************************
85 * Construct Method
86 */
87 public:
96 Timer(void);
97
98 /* *************************************************************************************
99 * Operator Method
100 */
101
102 /* *************************************************************************************
103 * Override Method
104 */
105
106 /* *************************************************************************************
107 * Public Method
108 */
109 public:
119 virtual bool cancel(void);
120
130 virtual bool isRunning(void);
131
144 virtual bool schedule(ufm::func::Runnable& task, uint32 delay);
145
158 virtual bool scheduleAtFixedRate(ufm::func::Runnable& task, uint32 delay);
159
160 /* *************************************************************************************
161 * Protected Method
162 */
163
164 /* *************************************************************************************
165 * Private Method
166 */
167
168 /* *************************************************************************************
169 * Static Variable
170 */
171
172 /* *************************************************************************************
173 * Static Method
174 */
175};
176
177/* ***************************************************************************************
178 * End of file
179 */
180
181#endif /* MFRAME_5764966F_889C_4856_97F7_96396168CDD2 */
物件基底類別
Definition Object.h:63
void delay(int milliseconds) const
延遲指定的毫秒數進行執行緒等待
系統計時器
Definition ufm/sys/Timer.h:45
virtual bool scheduleAtFixedRate(ufm::func::Runnable &task, uint32 delay)
以固定頻率排程任務
virtual bool cancel(void)
取消計時器任務
virtual bool schedule(ufm::func::Runnable &task, uint32 delay)
排程任務於指定延遲後執行
virtual bool isRunning(void)
檢查計時器是否正在運作
Timer(void)
建立新的計時器物件
Timer
Counter/Timer 0 Reset Control.
系統功能相關的命名空間
Definition Object.h:31
[Interface] 可執行函數式介面
Definition Runnable.h:40