Share via


TaskTimer Class

Definition

Caution

This class will be removed in the next major version. Application Insights base library wouldn't provide this functionality any longer.

Runs a task after a certain delay and log any error.

[System.Obsolete("This class will be removed in the next major version. Application Insights base library wouldn't provide this functionality any longer.")]
public class TaskTimer : IDisposable
[<System.Obsolete("This class will be removed in the next major version. Application Insights base library wouldn't provide this functionality any longer.")>]
type TaskTimer = class
    interface IDisposable
Public Class TaskTimer
Implements IDisposable
Inheritance
TaskTimer
Attributes
Implements

Constructors

Name Description
TaskTimer()

Fields

Name Description
InfiniteTimeSpan

Represents an infinite time span.

Properties

Name Description
Delay

Gets or sets the delay before the task starts.

IsStarted

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

Methods

Name Description
Cancel()

Cancels the current task.

Dispose()

Releases unmanaged and - optionally - managed resources.

Dispose(Boolean)

Disposes the timer.

Start(Func<Task>)

Start the task.

Applies to