<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />

Microsoft.ApplicationInsights.Extensibility.Implementation.TaskTimer

public class TaskTimer : IDisposable
Runs a task after a certain delay and log any error.
public static readonly TimeSpan InfiniteTimeSpan

Represents an infinite time span.

public TimeSpan Delay { get; set; }

Gets or sets the delay before the task starts.

public bool IsStarted { get; }

Gets a value indicating whether value that indicates if a task has already started.

public TaskTimer()

public void Cancel()

Cancels the current task.

public void Dispose()

Releases unmanaged and - optionally - managed resources.

protected virtual void Dispose(bool disposing)

Disposes the timer.

public void Start(Func<Task> elapsed)

Start the task.