C# Class GSF.TimeSeries.ConcentratorBase.FrameRateTimer

Frame rate timer.
One static instance of this internal class is created per encountered frame rate / processing interval.
Inheritance: IDisposable
Mostrar archivo Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
AddReference ( EventHandler tickFunction ) : void

Adds a reference to this FrameRateTimer.

Dispose ( ) : void

Releases all the resources used by the FrameRateTimer object.

FrameRateTimer ( int framesPerSecond, int processingInterval ) : System

Create a new FrameRateTimer class.

When the processingInterval is set to -1, the frame rate timer interval will be calculated as a distribution of whole milliseconds over the specified number of framesPerSecond. Otherwise the specified processingInterval will be used as the timer interval.

RemoveReference ( EventHandler tickFunction ) : void

Removes a reference to this FrameRateTimer.

Private Methods

Method Description
CalcWaitTimeForFrameIndex ( int frameIndex ) : int
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the FrameRateTimer object and optionally releases the managed resources.

SetTimerPeriod ( object sender, EventArgs e ) : void
mod_dis ( int framesIndex, double interval ) : double

Method Details

AddReference() public method

Adds a reference to this FrameRateTimer.
public AddReference ( EventHandler tickFunction ) : void
tickFunction EventHandler Tick function to add to event list.
return void

Dispose() public method

Releases all the resources used by the FrameRateTimer object.
public Dispose ( ) : void
return void

FrameRateTimer() public method

Create a new FrameRateTimer class.
When the processingInterval is set to -1, the frame rate timer interval will be calculated as a distribution of whole milliseconds over the specified number of framesPerSecond. Otherwise the specified processingInterval will be used as the timer interval.
public FrameRateTimer ( int framesPerSecond, int processingInterval ) : System
framesPerSecond int Desired frame rate for .
processingInterval int Desired processing interval, if applicable.
return System

RemoveReference() public method

Removes a reference to this FrameRateTimer.
public RemoveReference ( EventHandler tickFunction ) : void
tickFunction EventHandler Tick function to remove from event list.
return void