DispatcherTimerRun Method
Starts a new timer.
Namespace: Avalonia.ThreadingAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static IDisposable Run(
Func<bool> action,
TimeSpan interval,
DispatcherPriority priority = default
)
Public Shared Function Run (
action As Func(Of Boolean),
interval As TimeSpan,
Optional priority As DispatcherPriority = Nothing
) As IDisposable
static member Run :
action : Func<bool> *
interval : TimeSpan *
?priority : DispatcherPriority
(* Defaults:
let _priority = defaultArg priority new DispatcherPriority()
*)
-> IDisposable
- action FuncBoolean
-
The method to call on timer tick. If the method returns false, the timer will stop.
- interval TimeSpan
- The interval at which to tick.
- priority DispatcherPriority (Optional)
- The priority to use.
IDisposableAn
IDisposable used to cancel the timer.