Share via


Timer Constructor (TimerCallback, Object, Int32, Int32)

Initializes a new instance of the Timer class, using a 32-bit signed integer to specify the time interval.

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)

Syntax

[MethodImplAttribute]
public Timer (
         TimerCallbackcallback,
         Objectstate,
         intdueTime,
         intperiod
)

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
    The amount of time you want the system to delay before callback is invoked, in milliseconds. Specify zero (0) to start the timer immediately.
  • period
    The time interval between invocations of the callback method, in milliseconds.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

Timer Class
Timer Members
System.Threading Namespace