Table of Contents

Class RestartingTimer

Namespace
DrawnUi.Models
Assembly
DrawnUi.Maui.dll
public class RestartingTimer : IDisposable
Inheritance
RestartingTimer
Implements
Inherited Members
Extension Methods

Constructors

RestartingTimer(TimeSpan, Action)

Creates a new timer with the specified timespan delay and callback

public RestartingTimer(TimeSpan timespan, Action callback)

Parameters

timespan TimeSpan

Time to delay before invoking callback

callback Action

Action to execute when timer completes

RestartingTimer(uint, Action)

Creates a new timer with the specified millisecond delay and callback

public RestartingTimer(uint ms, Action callback)

Parameters

ms uint

Milliseconds to delay before invoking callback

callback Action

Action to execute when timer completes

Fields

disposed

protected bool disposed

Field Value

bool

Properties

IsRunning

Is actually running

public bool IsRunning { get; protected set; }

Property Value

bool

Methods

Dispose()

Disposes the timer and releases resources

public void Dispose()

Kick()

Starts the timer if not running or restarts it if already running, but only if the timer is active

public void Kick()

Restart()

Restarts the timer by stopping it and starting it again

public void Restart()

Start()

Starts the timer

protected void Start()

Stop()

Stops the timer

public void Stop()