ITimer 介面

定義

表示可以變更其到期時間和週期的定時器。

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
衍生
實作

備註

、 、 DisposeAsync() 的實作Change(TimeSpan, TimeSpan)Dispose()必須皆為執行緒安全,才能同時從多個執行緒存取計時器實例。

方法

名稱 Description
Change(TimeSpan, TimeSpan)

改變計時器的開始時間及方法呼叫間隔,並利用 TimeSpan 數值來衡量時間區間。

Dispose()

執行與釋放、釋放或重設非受控資源相關聯的應用程式定義工作。

(繼承來源 IDisposable)
DisposeAsync()

以異步方式執行與釋放、釋放或重設非受控資源相關聯的應用程式定義工作。

(繼承來源 IAsyncDisposable)

擴充方法

名稱 Description
ConfigureAwait(IAsyncDisposable, Boolean)

設定如何執行從異步可處置專案傳回的工作等候。

適用於