Timer Constructor (TimerCallback, Object, TimeSpan, TimeSpan)
Initializes a new instance of the Timer class, using TimeSpan values to specify time intervals.
Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Syntax
[MethodImplAttribute]
public Timer (
TimerCallbackcallback,
Objectstate,
TimeSpandueTime,
TimeSpanperiod
)
Parameters
- callback
A TimerCallback delegate that represents the method to be executed. - state
An object that contains information to be used by the callback method, or a null reference. - dueTime
A TimeSpan object that represents the amount of time you want the system to delay before the callback parameter invokes its methods. Specify -1 milliseconds to prevent the timer from starting. Specify 0 (zero) to start the timer immediately. - period
The time interval between invocations of the methods referenced by the callback method. Specify -1 milliseconds to disable periodic signaling.
Version Information
Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.