timer::timer 建構函式
建構會在指定的間隔之後引發指定訊息的 timer 傳訊區塊。
timer(
unsigned int _Ms,
_Type const& _Value,
ITarget<_Type> *_PTarget = NULL,
bool _Repeating = false
);
timer(
Scheduler& _Scheduler,
unsigned int _Ms,
_Type const& _Value,
_Inout_opt_ ITarget<_Type> *_PTarget = NULL,
bool _Repeating = false
);
timer(
ScheduleGroup& _ScheduleGroup,
unsigned int _Ms,
_Type const& _Value,
_Inout_opt_ ITarget<_Type> *_PTarget = NULL,
bool _Repeating = false
);
參數
_Ms
指定的訊息開始向下傳播之後必須經過的毫秒數。_Value
當計時器經過會向下傳播的值。_PTarget
目標,計時器會將其訊息傳播至該目標。_Repeating
如果為 true,表示計時器會每隔 _Ms 毫秒定期引發。_Scheduler
在其中排程 timer 傳訊區塊之傳播工作的 Scheduler 物件。_ScheduleGroup
在其中排程 timer 傳訊區塊之傳播工作的 ScheduleGroup 物件。 排程群組會隱含所用的 Scheduler 物件。
備註
如果您不指定 _Scheduler 或 _ScheduleGroup 參數,執行階段會使用預設排程器。
需求
標頭: agents.h
Namespace: 並行存取