DispatcherTimer.

Run(Func<bool>, TimeSpan, DispatcherPriority) Method

Summary

Starts a new timer.
Namespace
Avalonia.Threading
Containing Type
DispatcherTimer

Syntax

public static IDisposable Run(Func<bool> action, TimeSpan interval, DispatcherPriority priority = Normal)

Parameters

Name Type Description
action Func<bool> 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 The priority to use.

Return Value

Type Description
IDisposable An IDisposable used to cancel the timer.