DispatcherTimer.

RunOnce(Action, TimeSpan, DispatcherPriority) Method

Summary

Runs a method once, after the specified interval.
Namespace
Avalonia.Threading
Containing Type
DispatcherTimer

Syntax

public static IDisposable RunOnce(Action action, TimeSpan interval, DispatcherPriority priority = Normal)

Parameters

Name Type Description
action Action The method to call after the interval has elapsed.
interval TimeSpan The interval after which to call the method.
priority DispatcherPriority The priority to use.

Return Value

Type Description
IDisposable An IDisposable used to cancel the timer.