mFrame
載入中...
搜尋中...
無符合項目
mframe/src/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 mframe::sys {
22 class Timer;
23} // namespace mframe::sys
24
25/* ***************************************************************************************
26 * Class/Interface/Struct/Enum
27 */
29 /* *************************************************************************************
30 * Variable
31 */
32
33 /* *************************************************************************************
34 * Abstract Method
35 */
36
37 /* *************************************************************************************
38 * Construct Method
39 */
40 public:
45 Timer(void);
46
51 virtual ~Timer(void) override;
52
53 /* *************************************************************************************
54 * Operator Method
55 */
56
57 /* *************************************************************************************
58 * Public Method <Override>
59 */
60
61 /* *************************************************************************************
62 * Public Method
63 */
64 public:
81 virtual bool cancel(void);
82
89 virtual bool isRunning(void);
90
99 virtual bool schedule(mframe::func::Runnable& task, uint32 delay);
100
111
112 /* *************************************************************************************
113 * Protected Method
114 */
115
116 /* *************************************************************************************
117 * Private Method
118 */
119
120 /* *************************************************************************************
121 * Static Variable
122 */
123
124 /* *************************************************************************************
125 * Static Method
126 */
127};
128
129/* ***************************************************************************************
130 * End of file
131 */
132
133#endif /* MFRAME_5764966F_889C_4856_97F7_96396168CDD2 */
Definition Object.h:34
void delay(int milliseconds) const
函數 delay 等待內核滴答中指定的時間段。 對於1的值,系統等待直到下一個計時器滴答發生。 實際時間延遲最多可能比指定時間少一個計時器滴答聲,即在下一個系統滴答聲發生之前立即調用 osDelay(1...
Definition mframe/src/sys/Timer.h:28
virtual bool isRunning(void)
計時器是否正在運作
virtual ~Timer(void) override
Destroy the Timer object.
virtual bool scheduleAtFixedRate(mframe::func::Runnable &task, uint32 delay)
virtual bool schedule(mframe::func::Runnable &task, uint32 delay)
Schedules the specified task for execution after the specified delay.
Timer(void)
Construct a new Timer object.
virtual bool cancel(void)
Cancels this timer task. If the task has been scheduled for one-time execution and has not yet run,...
Definition Object.h:27
Definition Runnable.h:29