DispatcherExtensions.StartTimer 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.
Starts a timer on the specified IDispatcher context.
public:
[System::Runtime::CompilerServices::Extension]
static void StartTimer(Microsoft::Maui::Dispatching::IDispatcher ^ dispatcher, TimeSpan interval, Func<bool> ^ callback);
public static void StartTimer (this Microsoft.Maui.Dispatching.IDispatcher dispatcher, TimeSpan interval, Func<bool> callback);
static member StartTimer : Microsoft.Maui.Dispatching.IDispatcher * TimeSpan * Func<bool> -> unit
<Extension()>
Public Sub StartTimer (dispatcher As IDispatcher, interval As TimeSpan, callback As Func(Of Boolean))
Parameters
- dispatcher
- IDispatcher
The IDispatcher instance this method is called on.
- interval
- TimeSpan
Sets the amount of time between timer ticks.
The callback on which the dispatcher returns when the event is dispatched.
If the result of the callback is true
, the timer will repeat, otherwise the timer stops.
Exceptions
Thrown when callback
is null
.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應