DispatcherTimerRunOnce Method
Runs a method once, after the specified interval.
Namespace: Avalonia.ThreadingAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static IDisposable RunOnce(
Action action,
TimeSpan interval,
DispatcherPriority priority = default
)
Public Shared Function RunOnce (
action As Action,
interval As TimeSpan,
Optional priority As DispatcherPriority = Nothing
) As IDisposable
static member RunOnce :
action : Action *
interval : TimeSpan *
?priority : DispatcherPriority
(* Defaults:
let _priority = defaultArg priority new DispatcherPriority()
*)
-> IDisposable
- action Action
-
The method to call after the interval has elapsed.
- interval TimeSpan
- The interval after which to call the method.
- priority DispatcherPriority (Optional)
- The priority to use.
IDisposableAn
IDisposable used to cancel the timer.