Table of Contents

Class UiThreadRenderTimer

Namespace
Avalonia.Rendering
Assembly
Avalonia.Base.dll

Render timer that ticks on UI thread. Useful for debugging or bootstrapping on new platforms

[PrivateApi]
public class UiThreadRenderTimer : DefaultRenderTimer, IRenderTimer
Inheritance
UiThreadRenderTimer
Implements
Inherited Members

Constructors

UiThreadRenderTimer(int)

Initializes a new instance of the UiThreadRenderTimer class.

public UiThreadRenderTimer(int framesPerSecond)

Parameters

framesPerSecond int

The number of frames per second at which the loop should run.

Properties

RunsInBackground

Indicates if the timer ticks on a non-UI thread

public override bool RunsInBackground { get; }

Property Value

bool

Methods

StartCore(Action<TimeSpan>)

Provides the implementation of starting the timer.

protected override IDisposable StartCore(Action<TimeSpan> tick)

Parameters

tick Action<TimeSpan>

The method to call on each tick.

Returns

IDisposable

Remarks

This can be overridden by platform implementations to use a specialized timer implementation.