ITimer 介面

定義

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

public interface class ITimer : IAsyncDisposable, IDisposable
public interface ITimer : IAsyncDisposable, IDisposable
type ITimer = interface
    interface IDisposable
    interface IAsyncDisposable
type ITimer = interface
    interface IAsyncDisposable
    interface IDisposable
Public Interface ITimer
Implements IAsyncDisposable, IDisposable
衍生
實作

備註

Dispose()DisposeAsync() 的實作 Change(TimeSpan, TimeSpan) 都必須是安全線程,以便從多個執行緒同時存取計時器實例。

方法

Change(TimeSpan, TimeSpan)

變更開始的時間和計時器的方法引動過程之間的時間間隔,使用 TimeSpan 值來測量時間間隔。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

(繼承來源 IDisposable)
DisposeAsync()

非同步執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之由應用程式定義的工作。

(繼承來源 IAsyncDisposable)

擴充方法

ConfigureAwait(IAsyncDisposable, Boolean)

設定如何執行從非同步可處置項目傳回的工作 await。

適用於