C# Class Evbpc.Framework.Utilities.FpsCounter

A utilitarian class for calculating FPS.
Afficher le fichier Open project: EBrown8534/Framework

Méthodes publiques

Méthode Description
AddFrame ( ) : void

Indicates that a frame has passed. This should be called on each instance of a frame being drawn or updated (but not both).

BetweenTimes ( System.DateTime start, System.DateTime end ) : int

Gets the average framerate between two DateTime values, inclusively.

FpsCounter ( ) : System

Creates a new instance of the FpsCounter.

FpsCounter ( System.TimeSpan expirationTime ) : System

Creates a new instance of the FpsCounter with the specified ExpirationTime.

Immediate ( ) : int

Gets the FPS between the last two Frames.

LastHours ( int previousHours = 1 ) : int

Gets the average FPS over the last specified number of hours.

LastMinutes ( int previousMinutes = 1 ) : int

Gets the average FPS over the last specified number of minutes.

LastSeconds ( int previousSeconds = 1 ) : int

Gets the average FPS over the last specified number of seconds.

LastTimeSpan ( System.TimeSpan previousTime ) : int

Gets the average FPS over the last specified TimeSpan.

Method Details

AddFrame() public méthode

Indicates that a frame has passed. This should be called on each instance of a frame being drawn or updated (but not both).
public AddFrame ( ) : void
Résultat void

BetweenTimes() public méthode

Gets the average framerate between two DateTime values, inclusively.
public BetweenTimes ( System.DateTime start, System.DateTime end ) : int
start System.DateTime The DateTime to begin the calculation at.
end System.DateTime The DateTime to end the calculation at.
Résultat int

FpsCounter() public méthode

Creates a new instance of the FpsCounter.
public FpsCounter ( ) : System
Résultat System

FpsCounter() public méthode

Creates a new instance of the FpsCounter with the specified ExpirationTime.
public FpsCounter ( System.TimeSpan expirationTime ) : System
expirationTime System.TimeSpan The TimeSpan that represents the for this instance.
Résultat System

Immediate() public méthode

Gets the FPS between the last two Frames.
public Immediate ( ) : int
Résultat int

LastHours() public méthode

Gets the average FPS over the last specified number of hours.
public LastHours ( int previousHours = 1 ) : int
previousHours int The number of hours before now that should be included.
Résultat int

LastMinutes() public méthode

Gets the average FPS over the last specified number of minutes.
public LastMinutes ( int previousMinutes = 1 ) : int
previousMinutes int The number of minutes before now that should be included.
Résultat int

LastSeconds() public méthode

Gets the average FPS over the last specified number of seconds.
public LastSeconds ( int previousSeconds = 1 ) : int
previousSeconds int The number of seconds previous to now that should be measured.
Résultat int

LastTimeSpan() public méthode

Gets the average FPS over the last specified TimeSpan.
public LastTimeSpan ( System.TimeSpan previousTime ) : int
previousTime System.TimeSpan The TimeSpan before now that should be included.
Résultat int