Share via


Timer.Change Method

Changes the start time and the interval between method invocations for a Timer object (timer).

Overload List

Name Description
Timer.Change (Int32, Int32) Changes the start time and the interval between method invocations for a Timer object (timer), using 32-bit signed integers to specify time intervals.
Timer.Change (TimeSpan, TimeSpan) Changes the start time and the interval between method invocations for a Timer object (timer), using TimeSpan values to specify time intervals.

Remarks

To keep CPU and memory usage to a minimum, timers in the .NET Micro Framework operate slightly differently than do timers in the .NET Framework. Specifically, setting both the dueTime and period parameters does not cause a timer to be queued, as it does in the .NET Framework. Instead, calling the Change method throws an exception indicating that the timer has been retriggered.

It is possible for the common language runtime (CLR) to reuse a timer after the timer has been released by the Dispose method. As a result, the Change method may return true even though your application has already called Dispose on it.

Version Information

Available in the .NET Micro Framework version 4.1 and 4.2.

See Also

Reference

Timer Class
Timer Members
System.Threading Namespace