FakeTimeProvider.CreateTimer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
override System::Threading::ITimer ^ CreateTimer(System::Threading::TimerCallback ^ callback, System::Object ^ state, TimeSpan dueTime, TimeSpan period);
public override System.Threading.ITimer CreateTimer (System.Threading.TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period);
override this.CreateTimer : System.Threading.TimerCallback * obj * TimeSpan * TimeSpan -> System.Threading.ITimer
Public Overrides Function CreateTimer (callback As TimerCallback, state As Object, dueTime As TimeSpan, period As TimeSpan) As ITimer
Parameters
- callback
- TimerCallback
A delegate representing a method to be executed when the timer fires. The method should be reentrant, as it may be invoked simultaneously on two threads if the timer fires again while a previous callback is still being handled.
- state
- Object
An object to be passed to the callback
. This may be null
.
- dueTime
- TimeSpan
The amount of time to delay before callback
is invoked. Specify InfiniteTimeSpan to prevent the timer from starting. Specify Zero to start the timer immediately.
- period
- TimeSpan
The time interval between invocations of callback
. Specify InfiniteTimeSpan to disable periodic signaling.
Returns
The newly created ITimer instance.
Applies to
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za