C# Класс Evbpc.Framework.Utilities.FpsCounter

A utilitarian class for calculating FPS.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

AddFrame() публичный Метод

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
Результат void

BetweenTimes() публичный Метод

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.
Результат int

FpsCounter() публичный Метод

Creates a new instance of the FpsCounter.
public FpsCounter ( ) : System
Результат System

FpsCounter() публичный Метод

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.
Результат System

Immediate() публичный Метод

Gets the FPS between the last two Frames.
public Immediate ( ) : int
Результат int

LastHours() публичный Метод

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.
Результат int

LastMinutes() публичный Метод

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.
Результат int

LastSeconds() публичный Метод

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.
Результат int

LastTimeSpan() публичный Метод

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.
Результат int