C# Class GSF.Threading.SharedTimerScheduler

Represents a timer manager which is the scheduler of SharedTimer.
A SharedTimer with the same scheduler will use the same ThreadPool thread to process all of the SharedTimer instances in series when they have a common interval. Call order, based on registration sequence, will be preserved.
Inheritance: IDisposable
显示文件 Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Methods

Method Description
CreateTimer ( int interval = 100 ) : SharedTimer

Creates a SharedTimer using the current SharedTimerScheduler.

Dispose ( ) : void

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

SharedTimerScheduler ( ) : System

Creates a new instance of the SharedTimerScheduler class.

Private Methods

Method Description
RegisterCallback ( int interval, Action callback ) : WeakAction
RegisterCallback ( int interval, WeakAction weakAction ) : WeakAction
ReportStatus ( object sender, EventArgs e ) : void

Method Details

CreateTimer() public method

Creates a SharedTimer using the current SharedTimerScheduler.
public CreateTimer ( int interval = 100 ) : SharedTimer
interval int The interval of the timer, default is 100.
return SharedTimer

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

SharedTimerScheduler() public method

Creates a new instance of the SharedTimerScheduler class.
public SharedTimerScheduler ( ) : System
return System