Set the expiration time and repeat interval on the specified timer.
Namespace: RTX.ThreadingAssembly: IntervalZero.RTX (in IntervalZero.RTX.dll) Version: 12.0.0.0 (12.0.0.0)
Syntax
Parameters
- dueTime
- Type:
System Int32
The amount of time to delay before callback is invoked. Specify System.Threading.Timeout.Infinite to prevent the timer from starting. Specify zero (0) to start the timer immediately. Expiration is calculated relative to the current value of the clock associated with the timer at creation. The clock is specified in 100ns units.
- period
- Type:
System Int32
The time interval between invocations of callback. If dueTime is not infinite specify zero (0) or System.Threading.Timeout.Infinite to disable periodic signaling(timer occurs only once). The clock is specified in 100ns units. See the comments section below for an explanation of "period" behavior.
Return Value
Type:
Value true if the current instance has not been disposed; otherwise, false.
Remarks
Upon each expiration of the timer, the handling thread is signaled to indicate the expiration, and the specified handling routine is run. The timer signals expirations only on the RTX timer interrupt boundaries. The RTX timer interval will be rounded up to the RTX HAL timer resolution. The highest RTX timer resolution is 1 ms, which can be set in the RTX Properties control panel. The behavior of the pInterval parameter is as follows:
- If you set the RTX interval to less than the HAL timer period, RTX will set the interval equal to the HAL timer period.
- The RTX interval must be a multiple of the HAL Timer period. If you specify an interval that is not a multiple of the HAL Timer period, RTX will force the interval to the closest multiple of the HAL Timer period.
- Two timers with the same interval as the HAL Timer period will necessarily have the same phase. If you specify an interval that is less than the HAL timer period (default to 100 microseconds), RTX will use the HAL timer period as the RTX interval instead of the interval you specified.
See Also