C# Класс FlatRedBall.TimeManager

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
CurrentTime double

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

Метод Описание
CreateXmlSumTimeSectionReport ( string fileName ) : void
GetPersistentTimedSections ( ) : string
GetSumTimedSections ( ) : string
GetTimedSectionList ( ) : List
GetTimedSections ( bool showTotal ) : string
Initialize ( ) : void

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.

InitializeStopwatch ( ) : void
PersistentTimeSection ( string label ) : void
SecondsSince ( double absoluteTime ) : double
StartPersistentTiming ( ) : void
StartSumTiming ( ) : void

Begins Sum Timing

StartSumTiming(); foreach(Sprite sprite in someSpriteArray) { SumTimeRefresh(); PerformSomeFunction(sprite); SumTimeSection("PerformSomeFunction time:"); SumTimeRefresh(); PerformSomeOtherFunction(sprite); SumTimeSection("PerformSomeOtherFunction time:); }

SumTimeRefresh ( ) : void
SumTimeSection ( string label ) : void
TimeSection ( ) : void

Stores an unnamed timed section.

A timed section is the amount of time (in seconds) since the last time either Update or TimeSection has been called. The sections are reset every time Update is called. The sections can be retrieved through the GetTimedSections method. FRB.TimeManager.GetTimedSection

TimeSection ( string label ) : void

Stores an named timed section.

A timed section is the amount of time (in seconds) since the last time either Update or TimeSection has been called. The sections are reset every time Update is called. The sections can be retrieved through the GetTimedSections method. FRB.TimeManager.GetTimedSection

Update ( GameTime time ) : void

Performs every-frame logic to update timing values such as CurrentTime and SecondDifference. If this method is not called, CurrentTime will not advance.

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

CreateXmlSumTimeSectionReport() публичный статический Метод

public static CreateXmlSumTimeSectionReport ( string fileName ) : void
fileName string
Результат void

GetPersistentTimedSections() публичный статический Метод

public static GetPersistentTimedSections ( ) : string
Результат string

GetSumTimedSections() публичный статический Метод

public static GetSumTimedSections ( ) : string
Результат string

GetTimedSectionList() публичный статический Метод

public static GetTimedSectionList ( ) : List
Результат List

GetTimedSections() публичный статический Метод

public static GetTimedSections ( bool showTotal ) : string
showTotal bool
Результат string

Initialize() публичный статический Метод

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.
public static Initialize ( ) : void
Результат void

InitializeStopwatch() публичный статический Метод

public static InitializeStopwatch ( ) : void
Результат void

PersistentTimeSection() публичный статический Метод

public static PersistentTimeSection ( string label ) : void
label string
Результат void

SecondsSince() публичный статический Метод

public static SecondsSince ( double absoluteTime ) : double
absoluteTime double
Результат double

StartPersistentTiming() публичный статический Метод

public static StartPersistentTiming ( ) : void
Результат void

StartSumTiming() публичный статический Метод

Begins Sum Timing
StartSumTiming(); foreach(Sprite sprite in someSpriteArray) { SumTimeRefresh(); PerformSomeFunction(sprite); SumTimeSection("PerformSomeFunction time:"); SumTimeRefresh(); PerformSomeOtherFunction(sprite); SumTimeSection("PerformSomeOtherFunction time:); }
public static StartSumTiming ( ) : void
Результат void

SumTimeRefresh() публичный статический Метод

public static SumTimeRefresh ( ) : void
Результат void

SumTimeSection() публичный статический Метод

public static SumTimeSection ( string label ) : void
label string
Результат void

TimeSection() публичный статический Метод

Stores an unnamed timed section.
A timed section is the amount of time (in seconds) since the last time either Update or TimeSection has been called. The sections are reset every time Update is called. The sections can be retrieved through the GetTimedSections method. FRB.TimeManager.GetTimedSection
public static TimeSection ( ) : void
Результат void

TimeSection() публичный статический Метод

Stores an named timed section.
A timed section is the amount of time (in seconds) since the last time either Update or TimeSection has been called. The sections are reset every time Update is called. The sections can be retrieved through the GetTimedSections method. FRB.TimeManager.GetTimedSection
public static TimeSection ( string label ) : void
label string The label for the timed section.
Результат void

Update() публичный статический Метод

Performs every-frame logic to update timing values such as CurrentTime and SecondDifference. If this method is not called, CurrentTime will not advance.
public static Update ( GameTime time ) : void
time Microsoft.Xna.Framework.GameTime The GameTime value provided by the XNA Game class.
Результат void

Описание свойств

CurrentTime публичное статическое свойство

public static double CurrentTime
Результат double