timer::timer Constructor

Constructs a timer messaging block that will fire a given message after a specified interval.

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
);

Parameters

  • _Ms
    The number of milliseconds that must elapse after the call to start for the specified message to be propagated downstream.

  • _Value
    The value which will be propagated downstream when the timer elapses.

  • _PTarget
    The target to which the timer will propagate its message.

  • _Repeating
    If true, indicates that the timer will fire periodically every _Ms milliseconds.

  • _Scheduler
    The Scheduler object within which the propagation task for the timer messaging block is scheduled is scheduled.

  • _ScheduleGroup
    The ScheduleGroup object within which the propagation task for the timer messaging block is scheduled. The Scheduler object used is implied by the schedule group.

Remarks

The runtime uses the default scheduler if you do not specify the _Scheduler or _ScheduleGroup parameters.

Requirements

Header: agents.h

Namespace: concurrency

See Also

Reference

timer Class

Scheduler Class

ScheduleGroup Class