The delegate specified by the callback parameter is invoked once after dueTime elapses, and thereafter each time the period time interval elapses.
vb#
Note: |
|---|
Visual Basic users can omit the
TimerCallback constructor, and simply use the AddressOf operator when specifying the callback method. Visual Basic automatically calls the correct delegate constructor.
|
If dueTime is zero (0), callback is invoked immediately. If dueTime is Timeout..::.Infinite, callback is not invoked; the timer is disabled, but can be re-enabled by calling the Change method.
If period is zero (0) or Infinite and dueTime is not Infinite, callback is invoked once; the periodic behavior of the timer is disabled, but can be re-enabled using the Change method.
The method specified for callback should be reentrant, because it is called on ThreadPool threads. The method can be executed simultaneously on two thread pool threads if the timer interval is less than the time required to execute the method, or if all thread pool threads are in use and the method is queued multiple times.