Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ITimer Interface

Definition

Namespace:
System.Threading
Assembly:
System.Runtime.dll
Assembly:
Microsoft.Bcl.TimeProvider.dll
Package:
Microsoft.Bcl.TimeProvider v11.0.0-preview.5.26302.115
Source:
ITimer.cs
Source:
ITimer.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Represents a timer that can have its due time and period changed.

public interface class ITimer : IAsyncDisposable, IDisposable
public interface ITimer : IAsyncDisposable, IDisposable
type ITimer = interface
 interface IAsyncDisposable
 interface IDisposable
type ITimer = interface
 interface IDisposable
 interface IAsyncDisposable
Public Interface ITimer
Implements IAsyncDisposable, IDisposable
Derived
Implements

Remarks

Implementations of Change(TimeSpan, TimeSpan), Dispose(), and DisposeAsync() must all be thread-safe such that the timer instance may be accessed concurrently from multiple threads.

Methods

Name Description
Change(TimeSpan, TimeSpan)

Changes the start time and the interval between method invocations for a timer, using TimeSpan values to measure time intervals.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from IDisposable)
DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

(Inherited from IAsyncDisposable)

Extension Methods

Name Description
ConfigureAwait(IAsyncDisposable, Boolean)

Configures how awaits on the tasks returned from an async disposable will be performed.

Applies to


Feedback

Was this page helpful?